You will need a Stata version of 13.0 or above. Most code will work with older versions, but we have not checked. We used v.15.1, but all code should work for versions above 13.0.
We saved data in the Stata 13 version.
Setting up in Stata
Create a folder structure as described in setting up folders, basically having one directory for the codes (.do files) and one for data.
The first time you use these codes, you shall use run ch00-tech-prep/ch00_install_libraries from the case study working directory - this will install user written programs we use in the textbook.
How to run case studies in Stata
Each do file will ask you to set up your working directory before first running. You set it, and save the code, so you’ll only have to do it once.
Data directories will have be set up as well. There are two options.
Option 1: run directory-setting do file (RECOMMENDED)
Open our set-data-directory-example.do change the the path to where you store your data files in the da_data_repo directory and save as set-data-directory.do . From now, this will be automatically used in all the .do files.
You can set the data file every time by simply adding the path to the da_data_repo to the .do files. This is useful if you only use a few files.