Sie sind auf Seite 1von 2

STATA review

1. The different parts of the main window


a. Command line
b. Command history
c. Variables list
d. Output window
2. Using STATA interactively (i.e. typing in commands in the command window)
a. Opening a data-set File>Open> find right folder > open
b. Browsing the data command browse
c. Setting the path File>Change Working directory>find right folder OR: set path
d. Opening a data set from the command line in the folder for which we have set the path
using the command use
e. Opening the log file by going to File>log>begin
f. Viewing the log file by going to File>log>view
g. Updating the log file after a new command has been run, by clicking on the circular
arrows on the top of the file.
h. saving a dataset under a new name: File>Save as> find right folder> save
3. Using do-files
a. Advantage of do-files and log-files: your work does not get lost if you change computers
b. Copying over commands from the command list: left click on the first command you
want to copy, hold down the shift button, and then click on the last button. Right click to
send to do-file and it automatically opens this in a do-file. Then you need to clean up
the parts that did not work.
c. We will go over the parts under point 2 again:
i. Setting the path set path
ii. Opening a data set in the folder for which we have set the path using the
command use dataname
iii. Browsing the data command browse
iv. Writing the log file by writing
1. capture log close
2. log using nameoflogfile
v. Opening the logfile by clicking on File>log>view
d. Press Ctrl + D to run the do-file or click on the top right button (with triangle pointing
right)
e. Changing between do-file window and the main STATA window using Alt + Tab
f. Change font preferences
4. Using STATA help
a. If you know the command: help regress
b. If you dont know the command: search online
5. Specific commands
a. describe
b. summarize
c. summarize, detail
d. summarize; then generate newvar = r(mean) And generate newvarsum = r(sum)
e. To see all the statistics summarize presents, write
i. summarize
ii. return list
f. tabulate
g. regress
h. egen

Das könnte Ihnen auch gefallen