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).
Problem sets
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?
fsa_student_debt.dta, morg24_main.dta and morg24_educ.dta (2024 CPS MORG extracts from NBER).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.
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
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).