Posts Tagged ‘R’
R starter resources
I’m hardly the first person you would want to talk to about learning statistics in R. But if you’re bent on teaching yourself R, and you’ve ended up at my blog, here are some resources I found useful. (No opinions here about whether R is good/bad better/worse than Excel, Minitab, Matlab, Octave, SPSS, Stata, SAS, or others.)
R Rroject is the mothership.
Rstudio is an IDE for R, which provides a better GUI for some basic tasks. Most of what you’d expect from a modern IDE: syntax highlighting, GUI commands for loading and saving data, setting the working directory, separate panes for help files.
UCLA tutorials are a well written introduction to basic data entry, functions, and graphics in R. There are similar tutorials for Stata and other languages here as well.
Quick-R is a blog and a book written by a statistician for people switching from SPSS and Stata to R. Excellent and concise website detailing all of the basics: data entry, functions, plots, and how to think about all of the above.
R help list and archives are a way to ask questions of experienced users. You’ll get excellent help here, but it’s important to respect the etiquette. Basically, (1) read the package manual, (2) work up a minimal example with your question, and (3) be extremely precise about the data you have and the data you want, as opposed to the way you’re trying to solve that problem. This will become clearer if you read a few discussions in the archives.
StackExchange is a glorified bulletin board for programmers exchanging help and (frequently great) advice. Search the archives before posting new questions–the guys that hang out here hate duplicate postings. But it’s easier to navigate than the R help archives.
Demonstration of {estout}
I wrote a short talk demonstrating the use the R package {estout} for tonight’s New England R Users Group meeting. NB this is not a discussion of the econometric model, but rather a demonstration of how to get publication-quality results out of R efficiently.
The basic functions of {estout} are modeled on the Stata package estout. Once the R user has a dataset and a regression format in memory, {estout} will
- Print tables of summary statistics in CSV or LaTeX format.
- Print regression results in CSV or LaTeX format.
All the normal bells and whistles for econometrics are in there: reporting both coefficient estimates and their standard errors, asterisks for alpha=0.10, 0.05, and 0.01 significance levels, R-squared and number of observations. Options to customize are clearly marked in the documentation.
R goes to StackExchange
“What’s the big deal? We already have the r-help mailing list.”
No, it’s a big deal. Really.
Have you forgotten the joys of being a first-year R user, either begging advice off of friends or using Google to search archives of the R-help list? (Firefox has a dedicated search add-on for the R-help archives.) Yes, it gets the job done, but it’s kludge. If you’re a self-taught R programmer you know what I’m talking about.
StackExchange for Statistical Analysis will let experienced users answer statistics questions, presented in a legible format, and good answers are promoted to the top of the list. Questions can be tagged by subject matter and by package. Proper formatting for code swatches, and for discussion. It’s modeled on StackOverflow.
Export Trade Clusters
This post, as with the prior ones on trade clusters, aims to help visualize patterns of trade in the OECD from 50 years of partner trade statistics. The data is rich, meaning we should be able to develop rich intuition by exploring it visually.
These slides follow the method laid out in Jong-Eun Lee, “Two Maps for the World’s Trade Integration,” Applied Economics Letters, 11:4 (2004). All computations were performed in R.
Resources for Learning R in Iraq?
Please comment on this if you know of Arabic and Kurdish language resources for learning R.
I have been encouraging the economics faculty here to learn R for econometrics, both on grounds of quality and cost.
Here is a short list of resources that can help new users make the transition from SPSS if they choose.
- Home page and downloads http://cran.r-project.org/
- Instructions from UCLA http://www.ats.ucla.edu/stat/r/
- Instructions for SPSS Users http://statmethods.net/
- Graph examples http://addictedtor.free.fr/graphiques/
- Econometrics with R (pdf) http://cran.r-project.org/doc/contrib/Farnsworth-EconometricsInR.pdf
These resources are all in English. Does anyone know where to find R manuals or tutorials in Arabic?
Update: the R project posts foreign-language tutorials in Chinese, French, German, Italian, and several other languages but no Arabic.
