Federico Vegetti

random political research things

Introduction to Stata and R for data analysis (2016)

This is a very basic crash course to the use of Stata and R for data analysis that I gave at the University of Zagreb (Croatia) in February 2016. It lasted 2 full days, and it was followed by an excellent introduction to statistics by Zoltán Fazekas, and a tough-but-fair introduction to time series analysis (yes, it did escalate quickly) by Constantin Manuel Bosancianu, both good friends and brilliant methodologists.

The goal of the workshop was to train a group of M.A. and Ph.D. students to perform data analysis in 7 days for a political science project. Needless to say, it was very intensive. My part was mostly practical, i.e. we spent most of the time coding and figuring out what the code does. However, I did prepare some introductory slides that you can find here. I wasn't yet knitting to HTML back then, so we were looking at raw code with comments explaining what it does.

You can find the Stata code here, and the R code here. You can download the files and run the scripts directly by changing the file extension to .do and .r respectively. Data come from the Manifesto Project.