STATA Programs and Data Files

STATA Resources

ECOE 60303: Econometrics II (Graduate)


Below is an introduction to STATA that accompanies this class. The tutorial is designed to be interactive where you type along with the worksheet.� Please download and print the tutorial, find a computer with STATA, then start


Introduction to STATA tutorial (in pdf format)

Programs and data sets to accompany the tutorial

 cps87.xls Excel data set with raw data

 cps87.csv the same data set but in csv (comma delimited format)

 cps87.dta STATA data set STATA program that generates all the results in the tutorial

cps87.log Results from




Sample STATA programs, data, and output


Topic STATA Program STATA data set Output
Fixed/random effects psid1.dta psid1.log
Diff-in-diff Acemoglu and Angrist ada_jpe.dta ada_jpe.log
Kloeck/Moulton problem hsb_subset.dat hsb_subset.log
Simple bootstrap program cps87.dta bootstrap_example.log
Wild bootstrap t program carton_sales_taxes.dta
RD design, replicate Card et al card_et_al.dta card_et_al.log
2SLS, replicate Angrist/Krueger, QJE qob1.dta qob1.log
2SLS, replicate Evans and Angrist, AER pums80.dta pums80.log
Probit/logit, Evans, Farrelly, Montgomery, AER workplace1.dta workplace1.log
Odds/ratio in logit smoking/low birth weig natal95.dta natal95.log
Ordered probit, Self reported health status sr_health_status.dta sr_health_status.log
Multinomial logit job_training.dta job_training.log
Conditional logit travel_choice.dta travel_choice.log
Count data models, Doctor visits drvisits.dta drvisits.log
Conditional Poisson and NB fixed-effect models helmet_law_data.dta helmet_law_data.log
Tobit models, Censored wages in CPS tobit.dta tobit.log
Heckman sample selection model missing_data.dta missing_data.log
Mismeasured treatment jtpa_treatment.dta jtpa_treatment.log
Duration data

SES and mortality nlms_data.dta nlms_data.log
Inverse probability weighting (propensity score matching) workplace1.dta matching1.log


Sample Matlab programs


Topic Matlab program Data (excel format) Output
Generating basic OLS estimates basic_ols.m cps_wage_data.xlsx basic_ols.txt
Analytic gradient, hessian and log-likelihood function for Poisson model. Compare to estimates using numeric approximation poisson_check.m




drvisits.xlsx poisson_check.txt