An Introduction to Stata
By Mike Anderson
Installation and Start Up
A 50-user licensed copy of Intercooled Stata 8.0 for Solaris is accessible on any Athena
workstation. To use it, simply type “add stata” (hit enter) and then “xstata” (hit enter). You can
also run it remotely on athena.dialup.mit.edu by typing “add stata” and then “stata”. This will
only run the command line version of Stata, however, which can be difficult to use if you are
unfamiliar with the program. To use the X-Windows version of Stata remotely, you must log
into x.dialup.mit.edu (again, type “add stata” and then “xstata”). Two caveats: the performance
of x.dialup.mit.edu is sometimes less than breathtaking, and you must have an X11 server
installed on your personal computer in order to use it. If you are running Mac OS X, I would
strongly recommend Apple X11, available at www.apple.edu/macosx/x11. If you are running
Linux, you probably already have an X11 server installed. If you are running Windows, you are
on your own – I cannot provide support for software of such low quality.
Adjusting Stata’s Memory Allocation
Stata’s default memory setting is generally set at 1 MB. As you will see when you start
up Stata, this setting allows the program to allocate approximately 1000 Kbytes to data. While
this may be enough for some datasets, larger datasets can easily exceed this amount. If you run
into any problems with memory, you can increase the amount that Stata allocates to data by
typing “set mem 10m” (this would increase it to 10 MB – if you want, for example, 100 MB,
type 100m).
The Stata Interface
When first opening Stata, you will be greeted with four windows: Stata Results, Review,
Variables, and Command. The Stata Command window allows you to input commands; I will
refer to it as the command line. Stata Results displays the output from your commands;
Variables lists all of the variables in your dataset; and Review contains all of your previous
commands. Stata also includes an Editor -- essentially a spreadsheet -- which can be accessed on
the toolbar at the top of the screen (press Browse if you want to see the editor w/o the ability to
make changes). The Editor is useful for entering and manipulating data.
Stata’s Structure