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.

How to use this page
  1. Slides: read them before or after the lab.
  2. Do-files: download, change the cd line at the top to your own folder, and run in Stata from top to bottom.
  3. 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

Week 6 · Fri 9 Oct

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.

The do-file downloads WAGE1 with 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.
Week 5

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.

Week 4

Compare a school with itself

Pooled OLS versus fixed effects, and dummy variables as one intercept per school.

Week 3

Merging and reshaping data

append, merge (1:1, 1:m, m:1), reshape wide ↔ long, first on small family files, then on Michigan schools.

Data: dads · moms · faminc · kids · kids_wide · school files in teaching-data-simple/. Family examples adapted from UCLA OARC Stata tutorials.
Week 2

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).

The futures-price file used in the WASDE project comes from licensed Bloomberg data, so it is not posted here. Ask your TA for it.

Coming up

Fri 16 Oct · Do richer countries live longer? The Preston curve: fitted values, residuals, and why economists love logs.
Fri 23 Oct · Where in America can a poor kid get ahead? Chetty et al.'s mobility data: watch a coefficient flip sign when you add one variable.
Fri 30 Oct · Are Emily and Greg more employable than Lakisha and Jamal? The résumé experiment: dummies, interactions and the linear probability model.
Fri 6 Nov · Does inequality kill opportunity? The Great Gatsby curve: multicollinearity and heteroskedasticity.
Fri 13 Nov · Does a higher minimum wage kill jobs? Card and Krueger's New Jersey fast-food study: difference-in-differences.