ECON2228 Econometrics: Stata Lab
Boston College, Fall 2026 · Suraj Kumar's lab sections · every lab answers one policy question with real data from a published study.
- Slides: read them before or after the lab.
- Do-files: download, change the
cdline at the top to your own folder, and run in Stata from top to bottom. - Notebooks (blue buttons): open in your browser, nothing to install. The first load takes about 30 seconds. Open in molab runs the same notebook on a free server where you can also edit the code (sign in with Google or GitHub).
Labs so far
Is another year of school worth it? Looking under the hood of regress
526 American workers in 1976 (Wooldridge's WAGE1). We run regress wage educ and rebuild every number in Stata's table by hand: slope, residuals, R², F, standard error, t, p and the 95% interval. In the notebook you try to beat Stata's line, then rerun the 1976 survey thousands of times to see what a standard error really measures.
bcuse (and installs bcuse the first time), so it needs internet; there is no cd line to change. Step through it a few lines at a time.Does school spending raise test scores?
Papke (2005, Journal of Public Economics): Michigan's school-funding reform. Five regressions, from naive to Papke's model: controls, year dummies, school fixed effects.
Compare a school with itself
Pooled OLS versus fixed effects, and dummy variables as one intercept per school.
Merging and reshaping data
append, merge (1:1, 1:m, m:1), reshape wide ↔ long, first on small family files, then on Michigan schools.
Do-files, descriptive statistics and joins
Writing a do-file and a log, summary statistics, and a first merge in a mini research project on USDA crop reports (WASDE).