Stata for Economists
The complete Stata workflow used by working economists, policy analysts, and researchers. From loading a .dta file to running fixed-effects panel regressions and exporting publication-ready tables. Twelve modules that cover everything an economist needs to be productive in Stata, with hands-on practice on real Kenyan datasets.
12
Modules
~11h 5m
Reading time
Intermediate
Level
Self-paced
Format
Hands-on practice environment
Real Kenyan data. 35+ graded exercises. Instant feedback.
Three datasets drawn from our published analyses: 21 months of commercial bank rates, 14 half-years of pension industry allocation, and 14 observations of Kenyan mobile-money volumes. Type Stata commands, get instant syntax validation, and see the canonical answer plus the output the command would print. Covers everything from summarize to xtreg with clustered standard errors.
Syllabus
- 01→
Stata orientation and the do-file workflow
The Stata interface, why everything happens in do-files, working directories, log files, and the help system that actually answers your question.
~35 minModule 01 - 02→
Loading, importing, and inspecting data
use, import excel, import delimited, describe, codebook, summarize. The first ten minutes of any session.
~50 minModule 02 - 03→
Generate, replace, egen — variable transformation
Create variables, transform variables, recode variables, and use egen for the operations the basic generate cannot do.
~55 minModule 03 - 04→
Filtering, sorting, and the if/in qualifiers
keep, drop, sort, gsort, the if and in syntax, _n and _N — the verbs of subsetting Stata data.
~40 minModule 04 - 05→
Summarizing and tabulating
summarize, tabulate, table, tabstat, by:, bysort:, collapse. How to read a dataset before you model it.
~50 minModule 05 - 06→
Graphing in Stata
twoway line, scatter, bar, histogram, kdensity, marginsplot. Publication-quality charts from the command line.
~60 minModule 06 - 07→
OLS regression and post-estimation
regress, predict residuals, robust standard errors, lincom, test, the post-estimation suite that turns a model into a claim.
~65 minModule 07 - 08→
Factor variables, interactions, and margins
i. for categorical variables, c. for continuous, ## for interactions, and the margins command that makes nonlinear effects readable.
~55 minModule 08 - 09→
Panel data: xtset, xtreg, fixed and random effects
xtset, xtreg fe, xtreg re, the Hausman test, clustered standard errors, and the within transformation that demystifies fixed effects.
~60 minModule 09 - 10→
Time series operators and ARIMA
tsset, the L. F. D. operators, tsline, dfuller for unit roots, arima, and forecasting basics.
~55 minModule 10 - 11→
Reporting and reproducibility
esttab and outreg2 for publication tables, putexcel for custom output, locals and globals for parameterised do-files, and the loop syntax that scales analyses.
~50 minModule 11 - 12→
Three real analyses on Kenyan data
Replicate the bank-rates spread analysis, the pension-fund composition study, and the mobile-payments growth model — end to end, in Stata.
~90 minModule 12
How to use this course
Start with module 01 if the material is new; skip ahead if you have prior exposure. Each module is self-contained but the arc is sequential — the projects in the final module assume the toolkit from modules 1-11. Every module ends with key takeaways and a curated further-reading list with primary sources.