Appendix: Introduction to STATA
Stata is a professional data analysis software. It is widespread in academia, particular in economics,
sociology and in the health sciences. It has a much larger following outside of academia.
1. Starting Stata
There are several options to start stata:
In Windows, Stata is typically installed here: Start-> All Programs->Stata 12. In the MC Labs,
Stata is under “Data Analysis”: Start -> All Programs -> Data Analysis -> Stata 12
Click on a stata data set (.dta) .
Click on a file with the extension “.do” (including empty files) .
The last two alternatives have the advantage that any file that you save by default will save in the same
directory. You can find out in which directory you are by typing “pwd” in the command window.
When you first buy Stata you should update once to get the most recent version. If you use a version
installed by the Math Faculty you can ignore this.
update // Check whether you have the most recent version of stata.
update all // install the most recent update
2. Getting help
. help command // where command is a command you want help for
. search key_word // search for topics related to key_word
Also check the excellent PDF documentation under the help tab.
Frequently asked questions: http://www.stata.com/support/faqs/
Listserv where questions can be posted: http://www.stata.com/support/statalist/
3. Reading data
. clear // erasing variables currently saved
. use // open a stata data set
. insheet // read tab or comma delimited ascii files
. import excel // read excel spreadsheets
. input // Enter data from keyboard
4. Saving data
. save // save a stata data set (.dta)
. outsheet // save to