This page mostly has reference materials and tutorials used in courses or workshops that I have run.
Causal inference
- An introduction to (robust) standard errors (pdf) (Rmd)
- An introduction to using R (data frames, simple models, simulations, sampling, and functions) (pdf) (Rmd)
- Visualizing selection on observables (pdf) (Rmd)
Machine Learning Estimation of Heterogeneous Treatment Effects
A short tutorial on how to implement in R a simple version of a data-driven approach to uncovering heterogeneous treatment effects proposed by Athey and Imbens (2015). The tutorial can be found here.
An official package has now been released by Susan Athey and friends and can be found here.
Summarizing TIFF Data by Polygons in Shapefiles
A brief introduction to how to trim and spatially summarize data in tiff format by polygon shapefiles. Useful for averaging night time luminosity data by political district, for example.
Downloading Facebook and Twitter Data using Python
Put together for a workshop on January 29, 2016, this tutorial and accompanying example scripts provide a guide to downloading Facebook and Twitter data using their APIs. Done entirely in Python, this tutorial takes advantage of several Python modules to ease data collection and storage.
LUMS R Course
Class .Rmd Files
Class .R files
Datasets
Quality of Government
- Data in .csv file (right-click and save-as)
- .pdf documentation (40MB)
- accompanying .R exercise file
Pakistan 2018 candidate level election data
- Data in .csv file (right-click and save-as)
- accompanying .R exercise file
CricInfo batting data
- Data in .csv file (open and download in browser)
- accompanying .R exercise file
PK Supreme Court Survey