Questions about R

And lots of ’em.

I just downloaded the R package from the CRAN in Seattle. I haven’t opened it yet. I don’t even know what CRAN is. I’ve been gathering some data on the GDP (PPP) per capita of regions in the world and I want to tinker with them, but I also want to get familiar with a stats program.

Any help with the fundamentals of what I’m dealing with would be great. Thanks!

UPDATE 12/18/2014: Michelangelo has steered me away from R and into the loving arms of gretl:

I prefer gretl to R because the former has a menu-based interface. R, Stata, etc. on the other hand require you to now how to ‘code’. There are menus in the latter, but I don’t find them user friendly. The coding is hardly hard, but I think it confuses people who are just starting out and it isn’t really worth coding if you’re doing it for fun.

12 thoughts on “Questions about R

  1. It’s an open source statistical package as explained at r-project.org. Good tool for students forced to take a stats class or for researchers who are heavily into statistics and estimation. I like math and actually taught stats once but I think it’s a potential trap. At best it can suggest how people were motivated in the past but it’s no substitute for understanding of human action.

    Read Mises instead. Start with his shorter works.

    • Thanks for the heads up, Dr Gibson. I have read Liberalism and Nation, State, & Economy (two shorter works) because both are of interest to my interests.

      Omnipotent Government – another short work that is often compared to Hayek’s interwar classic Road to Serfdom – has been on my to-do list forever, and Socialism – a longer work – has been collecting dust on my shelf for quite some time now. I have talked myself out of reading Socialism a couple of times because of socialism’s decline in the United States.

      Contra Rick’s thoughtful musings, I think socialism is still a powerful ideology in much of the world. I just think the arguments in favor of socialism have become more and more primitive since the collapse of the Berlin Wall, and thus more easily debunked (which means I can get out of reading a theoretical treatise like Socialism!).

      I don’t know if I’ll ever get around to reading Human Action (even anthropology enthusiasts engage in cost/benefit analysis!), but it does come highly recommended so…

  2. My girlfriend uses R for statistics, and she is pretty well-versed in epistemology/scientific methology, so I’ll ask her for ya. Austrian fist-bump.

  3. If you’re new into stat packages, might I suggest gretl? Gretl is, like R, a free statistical analysis package. I find it to be much easier to use.

    What is your backgrounds in stats?

    • Thanks for the heads up Michelangelo.

      I don’t have a background in stats, so I figured I’d start here at NOL. That way my learning process might be of help to others in the future.

      I found Gretl online, but I am already confused. Is there a “beginner’s package download,” or something like that?

  4. Yeah, the organization on the gretl site itself is awful. Just download the self-installer in the below link.

    http://gretl.sourceforge.net/win32/

    I prefer gretl to R because the former has a menu-based interface. R, Stata, etc. on the other hand require you to now how to ‘code’. There are menus in the latter, but I don’t find them user friendly. The coding is hardly hard, but I think it confuses people who are just starting out and it isn’t really worth coding if you’re doing it for fun.

    ______

    I’m assuming your data is on excel? Once you have gretl installed just upload it into gretl (file -> open data -> excel).

    It will ask you if you want to keep it as cross sectional data; put yes unless you’re looking at data for the same region over time (in which case you’d be during a time series regression).

    You should have your data uploaded now. To run the regression simply go to model –> Ordinary Least Square.

    A new menu will pop up. Your dependent variable will be GDP (PPP). The dependent variable is the variable you’re trying to measure effect on. I’m assuming you want to see the effect of things like, labor or capital, on GDP (PPP). Simply add these other variables as ‘regressors’ (also known as independent variables). Once you’re done click ‘ok’.

    This will give you the output. From there you can click on ‘graphs’ to plot your data and look at it visually.

    The coefficients tell you how much a given variable affects the dependent variable. The number of stars *** next to the variable tells you how statistically significant a given variable is. The R-squared tells you how well your model predicts.

    There is plenty more that you need to know to really ‘understand’ why regression analysis works and different models you can use, but that should get you going.

  5. P.S. I really do urge you to graph your data out. I find that the best way to learn statistics is by actually looking at your data plotted.

    • Thanks Michelangelo!

      Yeah I mostly wanted a software that will make cool pictures out of data for me. Gretl sounds much easier to use than R. As soon as I get all the data punched into the excel sheet I’ll post something.

      I am digging out the GDP (PPP) per capita of regions within OPEC states. It’s weird, though, because some of the statistical regions that the OECD uses for data don’t correlate to electoral regions (though they are close). Why would the OECD want to create a region out of thin air for collecting data when they could just use the electoral regions already in place?

      Hopefully I’ll this figured out soon. I thought this was going to be a one or two day project but it’s becoming an obsession of mine.

  6. […] Similar to Brandon I’ve began playing around with new statistical packages. Like many libertarian scholars I have my skepticism about the limits of what we can learn from number crunching. I think there is a place for statistical analysis in the social sciences, but it is definitely meant to be a tool, not an ends to itself, and should be complemented with additional methods. […]

Please keep it civil

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s