{"id":87,"date":"2019-01-28T16:55:29","date_gmt":"2019-01-28T20:55:29","guid":{"rendered":"http:\/\/sites.nd.edu\/william-evans\/?page_id=87"},"modified":"2021-07-20T09:13:16","modified_gmt":"2021-07-20T13:13:16","slug":"stata-programs-and-data-files","status":"publish","type":"page","link":"https:\/\/sites.nd.edu\/william-evans\/econometrics-ii-graduate-2\/stata-programs-and-data-files\/","title":{"rendered":"STATA Programs and Data Files"},"content":{"rendered":"<p style=\"text-align: center\"><b>STATA Resources<\/b><\/p>\n<p style=\"text-align: center\"><b>ECOE 60303: Econometrics II (Graduate)<\/b><\/p>\n<p>&nbsp;<\/p>\n<p style=\"font-weight: 400\">\n<p style=\"font-weight: 400\"><strong>Below is an introduction to STATA that accompanies this class. The tutorial is designed to be interactive where you type along with the worksheet.\ufffd\u00a0Please download and print the tutorial, find a computer with STATA, then start<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/Introduction%20to%20STATA.pdf\">Introduction to STATA<\/a>\u00a0tutorial (in pdf format)<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>Programs and data sets to accompany the tutorial<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.xls\">cps87.xls<\/a>\u00a0Excel data set with raw data<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.csv\">cps87.csv\u00a0<\/a>the same data set but in csv (comma delimited format)<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.dta\">cps87.dta<\/a>\u00a0STATA data set<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.do\">cps87.do<\/a>\u00a0STATA program that generates all the results in the tutorial<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.log\">cps87.log<\/a>\u00a0Results from cps87.do<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>Sample STATA programs, data, and output<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"384\"><strong>Topic<\/strong><\/td>\n<td width=\"192\"><strong>STATA Program<\/strong><\/td>\n<td width=\"154\"><strong>STATA data set<\/strong><\/td>\n<td width=\"153\"><strong>Output<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Fixed\/random effects<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/psid1.do\">psid1.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/psid1.dta\">psid1.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/psid1.log\">psid1.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Diff-in-diff Acemoglu and Angrist<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/ada_jpe.do\">ada_jpe.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/ada_jpe.dta\">ada_jpe.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/ada_jpe.log\">ada_jpe.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Kloeck\/Moulton problem<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/hsb_subset.do\">hsb_subset.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/hsb_subset.dta\">hsb_subset.dat<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/hsb_subset.log\">hsb_subset.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Simple bootstrap program<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/bootstrap_example.do\">bootstrap_example.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps87.dta\">cps87.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/boostrap_example.log\">bootstrap_example.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Wild bootstrap t program<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/wild_bs_example_1.do\">wild_bs_example.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/wild_bs_example_1.log\">wild_bs_example.do<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/carton_sales_taxes.dta\">carton_sales_taxes.dta<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>RD design, replicate Card et al<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/card_et_al.do\">card_et_al.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/card_et_al.dta\">card_et_al.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/card_et_al.log\">card_et_al.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>2SLS, replicate Angrist\/Krueger, QJE<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/qob1.do\">qob1.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/qob1.dta\">qob1.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/qob1.log\">qob1.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>2SLS, replicate Evans and Angrist, AER<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/pums80.do\">pums80.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/pums80.dta\">pums80.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/pums80.log\">pums80.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Probit\/logit, Evans, Farrelly,\u00a0Montgomery, AER<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/workplace1.do\">workplace1.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/workplace1.dta\">workplace1.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/workplace1.log\">workplace1.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Odds\/ratio in logit smoking\/low birth weig<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/natal95.do\">natal95.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/natal95.dta\">natal95.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/natal95.log\">natal95.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Ordered probit, Self reported health status<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/sr_health_status.do\">sr_health_status.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/sr_health_status.dta\">sr_health_status.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/sr_health_status.log\">sr_health_status.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Multinomial logit<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/job_training_example.do\">job_training.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/job_training_example.dta\">job_training.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/job_training_example.log\">job_training.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Conditional logit<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/travel_choice_example.do\">travel_choice.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/travel_choice_example.dta\">travel_choice.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/travel_choice_example.log\">travel_choice.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Count data models, Doctor visits<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/drvisits.do\">drvisits.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/drvisits.dta\">drvisits.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/drvisits.log\">drvisits.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Conditional Poisson and NB fixed-effect models<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/helmet_law_data.do\">helmet_law_data.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/helmet_law_data.dta\">helmet_law_data.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/helmet_law_data.log\">helmet_law_data.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Tobit models, Censored wages in CPS<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/tobit.do\">tobit.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/tobit.dta\">tobit.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/tobit.log\">tobit.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Heckman sample selection model<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/missing_data.do\">missing_data.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/missing_data.dta\">missing_data.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/stata\/missing_data.log\">missing_data.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Mismeasured treatment<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jtpa_treatment.do\">jtpa_treatment.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jtpa_treatment.dta\">jtpa_treatment.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jtpa_training.log\">jtpa_treatment.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Duration data<\/strong><\/p>\n<p><strong>SES and mortality<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/nlms_data.do\">nlms_data.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/nlms_data.dta\">nlms_data.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/jpsm\/nlms_data.log\">nlms_data.log<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Inverse probability weighting (propensity score matching)<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/matching1.do\">matching1.do<\/a><\/strong><\/td>\n<td width=\"154\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/workplace1.dta\">workplace1.dta<\/a><\/strong><\/td>\n<td width=\"153\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/matching1.log\">matching1.log<\/a><\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>Sample Matlab programs<\/strong><\/p>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"384\"><strong>Topic<\/strong><\/td>\n<td width=\"192\"><strong>Matlab program<\/strong><\/td>\n<td width=\"192\"><strong>Data (excel format)<\/strong><\/td>\n<td width=\"192\"><strong>Output<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Generating basic OLS estimates<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/ols_program.m\">basic_ols.m<\/a><\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/cps_wage_data.xlsx\">cps_wage_data.xlsx<\/a><\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/ols_program.txt\">basic_ols.txt<\/a><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"384\"><strong>Analytic gradient, hessian and log-likelihood function for Poisson model. Compare to estimates using numeric approximation<\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/poisson_check.m\">poisson_check.m<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/calcloglike.m\">calcloglike.m<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/calcgrad.m\">calcgrad.m<\/a><\/strong><\/p>\n<p><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/calchess.m\">calchess.m<\/a><\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/drvisits.xlsx\">drvisits.xlsx<\/a><\/strong><\/td>\n<td width=\"192\"><strong><a href=\"https:\/\/www3.nd.edu\/~wevans1\/ecoe60303\/poisson_check.txt\">poisson_check.txt<\/a><\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-weight: 400\"><strong>\u00a0<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>STATA Resources ECOE 60303: Econometrics II (Graduate) &nbsp; Below is an introduction to STATA that accompanies this class. The tutorial is designed to be interactive where you type along with the worksheet.\ufffd\u00a0Please download and print the tutorial, find a computer with STATA, then start \u00a0 Introduction to STATA\u00a0tutorial (in pdf format) Programs and data sets [&hellip;]<\/p>\n","protected":false},"author":3287,"featured_media":0,"parent":76,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-87","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/pages\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/users\/3287"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/comments?post=87"}],"version-history":[{"count":1,"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/pages\/87\/revisions"}],"predecessor-version":[{"id":88,"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/pages\/87\/revisions\/88"}],"up":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/pages\/76"}],"wp:attachment":[{"href":"https:\/\/sites.nd.edu\/william-evans\/wp-json\/wp\/v2\/media?parent=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}