Links to section notes and relevant files.
Note: I’ve updated the web-format (HTML) files, so they should run. The attached PDFs and ZIPs remain as they were in spring 2017.
These notes (and I) owe a lot to previous GSIs for this class: Fiona Burlig, Kenny Bell, Patrick Baylis, and Dan Hammer.
Install R, RStudio, and other relevant programs; resources for R; general suggestions for coding.
Learning the basics of R: installing and loading packages; loading various data types (haven
and readr
); basic data summarization and manipulation (introduction to dplyr
).
Vectors, matrices, and general mathematical usage of R.
Writing your own (OLS) functions, using loops, and running simulations in R.
Logical operators, optional arguments to your custom functions, Frisch-Waugh-Lovell (FWL) theorem, omitted variable bias, and measures of fit/overfitting.
Statistical inference via hypothesis testing: t tests and \(F\) tests. Plus simulation and parallelization.
ggplot2
Creating informative and aesthetically figures using R’s ggplot2
—scatter plots, histograms, density plots, and more.
Generalized least squares (GLS), weighted least squares (WLS), and more simulations!
OLS as \(N\) gets (very) big. Also: simulations, coding efficiency, and new ggplot2
techniques.
Calculating standard errors via analytical methods and via the Delta Method. Includes linear and nonlinear combinations of parameters. Plus making prettier tables.
Calculating standard errors in various situations: spherical errors, heteroskedastic errors, temporally correlated errors, spatially correlated errors, clustered errors.
Instrumental variables (IV) and two-stage least squares (2SLS). Plus measurement error.
Spatial data. Shapefiles, points data, maps, and—more generally—R as a GIS.
Spatial data. Rasters, geocoding, and mapping in R.
data.table
An introduction to the data.table
package (useful for working with large datasets).