Seminario de Análisis Empírico
Fall 2026
Tentative — subject to change during the term.
Syllabus
Slides
Lecture 11: preparation
Download and install Antigravity. Follow the installation and project setup memo (PDF). Download and extract the Lecture 11 project files (ZIP). Bring a laptop to class if you can. We will run the checks and work through the project in class.
AI resource library
Browse the AI resource library: 54 podcasts, videos, tutorials, and research workflows, organized by topic. Eight starting points, suggested excerpts, and advanced references help you choose what to explore.
Examples of empirical work
R Code
Each script reproduces every output printed on the matching slides. Class3.R, Class4.R, Class6.R and Class8.R read the data files listed below by relative paths, so run them from the folder that contains data/; Class6.R writes its figures to a Figures/ folder it creates. Class5.R needs no data file.
- Lecture 3 -
Class3.R - Lecture 4 -
Class4.R - Lecture 5 -
Class5.R - Lecture 6 -
Class6.R - Lecture 7 - R scripts and data (.zip)
- Lecture 8 -
Class8.R - Lecture 9 -
Class9.R
Class8.R and Class9.R require tidyverse and create their output folders.
The Lecture 7 download includes the PDF, scripts, and data. Extract the folder and run the scripts from the folder that contains Rcode/ and data/.
Practice sessions
Three guided 90-minute practices use the one-year Partnership Schools for Liberia evaluation to build an analysis dataset, reproduce figures, and fit published models. A separate 45-minute GIS extension maps county coverage.
Download the complete AER workshop (.zip) — the four scripts, the background slides, data, the student guide and reference outputs.
Background slides (PDF) cover the program, the experiment and the data. The practice itself is in the scripts.
| Practice | Prerequisites | Time | Script |
|---|---|---|---|
| 1 · Build the dataset | Importing, cleaning and joins | 90 min | Class4B_1_Dataset.R |
| 2 · Reproduce figures | Visualization | 90 min | Class4B_2_Figures.R |
| 3 · Models and randomization inference | Programming and experiments | 90 min | Class4B_3_RI.R |
| 4 · Map county coverage | Spatial data | 45 min | Class4B_4_GIS.R |
Study: Romero, Sandefur and Sandholtz (2020), American Economic Review 110(2).
Problem Sets
- Homework 1 - Where data comes from
- Homework 2 - Asking the AI, and then verifying it
- Homework 3 - Stacking, joining, and reshaping the ENIGH
- Homework 4 - Simulating a casino game
- Homework 5 - ECOBICI station imbalances
- Homework 6 - Air pollution during ECOBICI trips
- Homework 7 - Headlines and selection bias
- Homework 8 - Randomization inference
Data
- Lecture 6 — Municipal data (CSV): population, schooling, illiteracy, and poverty rates for 2,469 municipios. Save the file as
data/municipios_clean.csv(remove the download’sAnalisisEmpirico_202602_prefix). - Lecture 7 — Spatial data and scripts (ZIP): municipal and alcaldía boundaries, poverty, ECOBICI stations and flows, elevation, and air quality. Extract the ZIP and keep its folder structure; the input files are in
data/L07/teaching/. The bundle also includes the scripts, lecture PDF, and data documentation.
Run the scripts from the folder that contains data/ (and Rcode/ for Lecture 7).
Other course data and preparation scripts:
enigh_hogares_raw.csv— 91,414 households: income, household size, state, survey weightconeval_pobreza.csv— CONEVAL poverty indicators, for the join exercisesbuild_data_real.R— the script that produces all threeconeval_municipal_2020_raw.csv— 2,469 × 37, the CONEVAL release uncleaned: this is the file Lecture 4 cleans on screen- Read me first — provenance, attribution, and what to read before you compute anything
Sources for the municipal and ENIGH files: INEGI, Censo de Población y Vivienda 2020 · INEGI, ENIGH 2024 · CONEVAL, Medición de la pobreza municipal 2020. Accessed 2026-08-16. Nothing in these files is simulated or imputed.