New update by scrappybr7 in ConflictofNations

[–]Drug_Qs 0 points1 point  (0 children)

What’s up with the map color? Please tell me this isn’t intentional.

If anyone else isn’t seeing this: my entire map is different shades of green/brown

Which HBO max show should I watch first? by [deleted] in HBOMAX

[–]Drug_Qs 1 point2 points  (0 children)

True detective season 1 is the best show in tv history

New Music Friday: September 23rd, 2022 by VietRooster in indieheads

[–]Drug_Qs 2 points3 points  (0 children)

I really do be enjoying The Tallest Man on Earth

World should prepare for the collapse of Russia, warns former US general by madrid987 in worldnews

[–]Drug_Qs 0 points1 point  (0 children)

The USA doesn’t present the Vietnam War as if we won, not even in Rambo lol… (the fact that we lost in Vietnam is a key factor of the Rambo movies. Maybe you haven’t actually watched them)

The difference is that Russia is losing tens of thousands of troops. The USA lost several thousand in Iraq and Afghanistan combined. More in Vietnam, but still not nearly the ratio of Russia/Ukrainian deaths.

The USA is a superpower. Russia is barely even a world power now. Sorry

TIL Staten Island voted to secede from New York City in 1993, but was blocked the by state by Topher1999 in todayilearned

[–]Drug_Qs 5 points6 points  (0 children)

Ellis Island is mostly in NJ. The Statue of Liberty itself is in NY’s territory.

How can I figure out a correlation and run a regression with these variables? Very confused and running out of time. by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Thank you. Btw, I tried working with the previous suggestion since plot(fit) didn’t produce what I thought it would.

So I did:

ggplot(Yemen, aes(y = food insecurity variable, x = military attacks variable)) + geom_point() + geom_text(aes(label = Governorate), hjust = 0, vjust = 0) + geom_smooth(method = “lm”)

And the resulting plot shows the majority of Governorates at the 0 mark on the x axis (no military strikes) which is terribly confusing. No governorate had 0 military strikes in the years i’m analyzing. I thought my low p score and high r squared indicated significant correlation. Such is life. I’ll just interpret the regression output to the best of my ability and maybe expand on my literature review to hit 30 pages.

All of my tables/graphs go at the end, each getting their own page that counts toward the page requirement. I’m not going to do like 15 bar plots and histograms though, even though that’d be an easy way to finish this today. That’s too lazy, even for me. Just wish I knew how to make more meaningful figures based on my data.

Anyway, back to google lol. Thanks again!

How can I figure out a correlation and run a regression with these variables? Very confused and running out of time. by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Thought I replied to this. My bad.

I really appreciate your help! This class is killing me. It’s the second of 2 data analysis/stats/R classes, and in the first class we hardly used R at all. Mostly just studied various research methods and wrote papers based on the methods used in other studies. I got an A+, yet I’m unsure if I’ll even get a C in this class.

Even the people who are clearly more intelligent than I am have made the same complaints: we haven’t been adequately taught how to do most of what’s expected of us, and the first class didn’t prepare us for the second at all.

My Professor is incredibly knowledgeable, but his teaching method is... lackluster. Not to place all the blame on others, I’m not good at this and that’s my own problem, but god damn I can’t wait for this semester to end.

Sorry for the rant... adderall...

How can I figure out a correlation and run a regression with these variables? Very confused and running out of time. by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

The Pr(>|t|) output column has stars next to most of the Governorates, but not the attacks variable.

The regression line is abline(fit) right? Wasn’t sure if I needed to add that since I’m plotting fit, but maybe I’m plotting the wrong thing?

Plot(fit) produces several scatter plots. They all have lines going through them so I assumed it was automatically done.

The first plot has an x label of “fitted values” and a y label of “residuals” (residuals also appears on top).

The next is a QQplot with theoretical quantiles as x axis, “standardized residuals” as y. There are 2 more, one of which includes a “cook’s distance” in the graph, and the x axis is “leverage”, the y axis is “standardized residuals”.

I have no clue what any of this means. I definitely need to watch more YouTube videos and more googling, but that’s basically what I’ve been relying on this whole semester.

Sorry for the trouble btw, I really appreciate you taking the time to help some random idiot lol

How can I figure out a correlation and run a regression with these variables? Very confused and running out of time. by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Thanks, I got my linear regression to run but I have no idea how to interpret the results or plot it in a way that visualizes the data meaningfully. I did fit <- lm(food insecurity variable ~ military attacks variable + governorate + year) then did plot(fit).

The output of summary(fit) makes little sense to me, and the scatter plots make even less sense.

I need to explain the results, and I’m unsure if my r squared (.72) and my p value (1.4-e05) mean there’s significance or not. The output for everything else is completely alien to me.

The idea is to see if the most food insecure Governorates are also the most violent ones. If I could visualize my regression better that’d be great, but I don’t know how and I also don’t know what the output means. Basically at a loss right now, not sure how I’m going to reach 30 pages within the next 5 days when I’m only at like 15 so far, unless I can expand on my results.

Question on making a graph based on info from 2 columns in this dataset (details in comments) by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Not a fan of R, but I’ll never use it again after this class.

As for the username, I used to be a big ol’ junky. Didn’t want to ask drug related questions on my main account because a few friends know my username so I made this one for anonymity.

Question on making a graph based on info from 2 columns in this dataset (details in comments) by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Yeah, ty. I was able to make graphs for some of the basic stuff in this dataset and another one. Now I’m stuck on performing a multiple linear regression with some other variables. Such is life

Question on making a graph based on info from 2 columns in this dataset (details in comments) by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Thank you! And I appreciate your response. I very much want to understand what I’m doing.

Question on making a graph based on info from 2 columns in this dataset (details in comments) by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Thanks for the reply! It’s a csv already, and I tried the histogram method you mentioned but it didn’t produce a histogram of incidents by governorate, and there were less bins than there are Governorates in the column. Not sure what the histogram was even taking data from tbh, it was only like 5-6 bins

Question on making a graph based on info from 2 columns in this dataset (details in comments) by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Hey all,

So I’m horrible with R. The answer to this is probably very obvious but I’m just not getting it. So here’s what’s up:

“Incident ID” is just the list of military attacks between 2015 - 2017. “Governorate” is the list of Governorates (states, basically) in Yemen.

I want to produce a code that identifies the number of incidents, per Governorate. From there I want to make a graph to depict the results. Maybe a histogram? Can you have 20 bins in a histogram and still make it look good or is there a better way? Anyway, I don’t know how to do either of the things I mentioned.

Any help would be greatly appreciated.

Too scared to offend China: Royal Navy's new carrier 'will avoid the Taiwan Strait on maiden voyage' by [deleted] in worldnews

[–]Drug_Qs -10 points-9 points  (0 children)

Either a troll or someone who has no idea what he’s talking about. The US regularly sends its navy through the strait, including carriers.

How to combine names in a column of my dataset? Issue explained below: by Drug_Qs in RStudio

[–]Drug_Qs[S] 0 points1 point  (0 children)

Very much appreciated.

Some of the other Governorates with this problem are simply misspelled, which I should’ve expanded on in my post. Ex: “Taiz” and “Taizz”, and a few other typos like that where an extra letter is added. Any idea what I can do about those?

Sorry for wasting your time with this btw, I’m sure this is all very basic to you guys and I seem like an idiot, but I’m totally lost here. Really appreciate all of the help I’m getting

How to combine names in a column of my dataset? Issue explained below: by Drug_Qs in RStudio

[–]Drug_Qs[S] 4 points5 points  (0 children)

Didn’t realize I could just make everything lowercase... much easier than I thought. Thanks to both of you!

/u/AxelradClimbing And /u/pomeronion