Stata Windows environment
The Stata manual set includes a volume "Getting Started with Stata for Windows." It's a readable yet thorough introduction, and much of it is a tutorial. In previous versions of Stata, this was a printed book. In Stata 11 it's available under the Help menu - click on PDF Documentation, and it's the first item listed.
If you don't have access to that volume, you can use this page for some general pointers to get you started.
Starting and stopping Stata
On desktop computers at CPC, Stata is available only through the Start menu at the bottom-left corner of your screen. Click on Start, Software Run, Statistics, Stata 11 Run. Click on the "X" in the upper right corner to stop Stata. (To get started using Stata on a CPC Unix platform, contact cpchelp@unc.edu.)If you have data in memory, and you've changed the data in any way (even sorting), Stata won't let you quit without either saving the data to a permanent file or clearing data from memory. If you're sure you don't want to save the data in memory, you can type:
exit,clearto get out of Stata.
4 windows
Stata gives you 4 windows: Command, Results, Review, and Variables.- Command: type a command here and press Enter
- Results: the results of your command are displayed here
- Review: each command you type is displayed here
- Click on a command to put it into the command window for editing
- Double-click on a command to execute it directly
- Variables: lists the variables in memory
- Click on a variable name to put it into the command window
Menus
Stata displays 8 drop-down menus across the top of the outer window:- File
- Open: open a Stata data file (use)
- Save/Save as: save the Stata data in memory to disk
- Do: execute a do-file
- Filename: copy a filename to the command line
- Print: print log or graph
- Exit: quit Stata
- Edit
- Copy/Paste: copy text among the Command, Results, and Log windows
- Copy Table: copy table from Results window to another file
- Table copy options: what to do with table lines in Copy Table
- Data, Graphics, Statistics - build and run Stata commands from menus
- User - menus for user-supplied Stata commands (download from Internet)
- Window - bring a Stata window to the front
- Help - The Stata manual set in PDF format plus Stata command syntax and keyword searches
Button bar
The buttons on the button bar are from left to right (equivalent command is in bold):- Open a Stata data file: use
- Save the Stata data in memory to disk: save
- Print a log or graph
- Open a log, or suspend/close an open log: log
- Open a new viewer window (to view Help or a log file)
- Bring the graph window to the front (if you've created a graph)
- Open a do-file
- Edit the data in memory: edit
- Browse the data in memory: browse
- Open the Variables Manager
- Scroll another page when --more-- is displayed: Space Bar
- Stop current command or do-file: Ctrl-Break
Sources of help
- Help menu
- Command: almost the full reference manual for each Stata command
- Search: keyword search of the manuals, technical bulletins, and frequently asked questions
- and lots more!
- Data, Graphics, and Statistics menus
- build a command with the correct syntax for you
- lead you to consider options that you might easily overlook
- Manuals
At CPC we no longer carry the printed manual set, since it's available in PDF in the Help menu. However, we do have other Stata and third-party books that focus on specific aspects of Stata programming.See getting help for Stata for more resources.
Review again?
Another topic?


