Linear Models


  1. Linear Regression with R/Stata
  2. Advanced Topics in Applied Regression

As the workhorse model in statistical inference, linear specifications are ubiquitous in applied research. I was fortunate to get the chance to teach classes focusing either on the basics of OLS, or on more advanced topics in regression, at the Winter and Summer School in Methods and Techniques run by the ECPR.

TAing for a course in Generalized Linear Models taught by Federico Vegetti at the ECPR Summer School constituted a great learning experience, and preparation stage for these classes.

Each class listed below has a short description, and points to a GitHub repository where all materials are available for download.

Linear Regression with R/Stata

The Linear Regression with R/Stata: Estimation, Interpretation, and Presentation course was offered at the ECPR Winter School between 2017 and 2019. In the most recent iteration of the course, Sophia Fauser and Theresa Henn (both at the University of Bamberg at the time) offered invaluable help as teaching assistants.

The course exposed participants to the rigorous application of linear regression models. Over five days we went through estimating these models, interpreting their results and judging how well the models fit the data. We gradually explored more complex specifications, learning how to deal with dichotomous predictors and interactions. We also focused on the assumptions which OLS models are based on, how to check for these in the data at hand, and how to handle situations when they are not met. Throughout the class, we emphasized presenting results as intuitively as possible for our audience, either through graphs or predicted values.

This format hopefully served participants interested in a thorough coverage of linear models, both for immediate use and as a stepping stone for more advanced statistical procedures. The class was conducted primarily in R, but also shared Stata code for all procedures and models.

All materials (data sets, slides, and code files) are made available here.

Advanced Topics in Applied Regression

The course was taught at the ECPR Summer School in 2017, in a 5-day format. It provided a set of tools that could be employed in situations when standard OLS estimation does not produce adequate estimates. Weighted Least Squares and cluster-corrected standard errors were discussed as solutions to the problem of heteroskedasticity, which can severely impact estimates of uncertainty in standard OLS. Interactions can be of help in instances when we have reason to suspect that effects vary across subgroups in the population. Nonlinear regression can handle situations when the relationship between two variables has a more complex form than a simple straight line. Finally, certain types of robust regression serves to produce proper estimates even in situations of data outliers.

All these topics were discussed both theoretically, in the lectures, as well as practically, with the use of actual social science data sets and the R statistical environment. All materials (data sets, slides, and code files) are made available here.