A Practical Introduction to Stata Basics
Stata for dummies v1m
Gwilym Pryce 4 March 2009
These notes are designed to accompany a 2 hour practical workshop on the widely used
statistics programme, Stata. The session includes guidance on how to open and exit Stata,
how to open a data file, how to use a syntax file, how to save output, how to create a
simple table, how to create a graph, and how to run a simple regression.
1. How to Load-up and Exit Stata
To open Stata, click on the Start button and select:
Statistical Apps
Stata10
To exit Stata, press <alt+F4> or click on File, Exit. Make sure, however, you have
saved your work before exiting. You will learn how to do this below.
2. What you see when you open Stata
Depending on how Stata has been set up on your computer, you will see four frames
or windows within Stata: Results, Command, Review, and Variables. If any of these
are not visible, just click on Window on the menu bar and select the appropriate item.
The Window menu also allows you to access other windows – Data, Viewer, Do,
which are not opened automatically when you load up Stata. A brief explanation of
each of these windows is given below.
Results:
The largest window is the Results window. When you first load up Stata this
window usually lists details on the version of Stata, the serial number of your
copy, and the web address of the Stata corporation.
Command:
The Command window is where you type instructions that you want Stata to act
on immediately (as opposed to a Do-file which allows you to accumulate a list of
commands before requesting that Stata execute them). The results of your
commands will usually be displayed in the Results window (no surprises there
then). For example, if you click in the Command window and type describe
then hit the <Enter> key on your keyboard, it will give basic details of the