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

cps87.do STATA program that generates all the results in the tutorial

cps87.log Results from cps87.do

 

 

 

Sample STATA programs, data, and output

 

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

SES and mortality

nlms_data.do nlms_data.dta nlms_data.log
Inverse probability weighting (propensity score matching) matching1.do 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

calcloglike.m

calcgrad.m

calchess.m

drvisits.xlsx poisson_check.txt