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

Problem sets

Problem set · 19 questions · 100 points

Is college worth it?

You are a new economist at the White House Council of Economic Advisers. First, is student debt still climbing, and what did COVID do to it? (Federal Student Aid data.) Then estimate the college premium from the 2024 CPS: clean the data, merge in education, and compare high school and Bachelor's earnings. Finally, write a 150-word memo to the President: how many years of the premium does it take to pay off the debt?

The zip has the PDF, the Word template and the three data files: fsa_student_debt.dta, morg24_main.dta and morg24_educ.dta (2024 CPS MORG extracts from NBER).
Problem set · 32 questions · 100 points

Moneyball on a budget at Fenway ⚾

You are the new general manager of the Boston Red Sox, with $150 million to spend. Part 1: use 25 seasons of team data (SABR Lahman database) to find what wins games: OBP or SLG, FIP and fielding, with t- and F-tests. Part 2: put a price on a win and on every 2025 player, then pick your team within the budget.

The zip has the PDF, the Word template, Teams.csv and the four 2025 player files (batting_2025, pitching_2025, salaries_2025, payroll_mn). Lahman data are CC BY-SA 3.0.

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.