Etude
use save
clear set mem 80m
exit help ____
search ____ log
if
in describe (des) ds codebook inspect summarize (sum) lsum list varlist sort gsort order aorder
use a data set–e.g.: use anes92 save a data set: save anes92–or save anes92,replace (if the data set already exists) save anes92,old (for STATA 5 format) Or Control+S clear existing data in memory allocate 80 megs of memory to STATA (default depends on machine) NOTE THAT STATA has a maximum limit of 2047 variables no matter how much memory you have. exit STATA help for STATA command ______ help contents gives a list of STATA commands where you can get help. search the on-line manual for all references to ____ (e.g., search regress gives all references to regress in STATA—it’s a lot!) set log file for output, e.g., log using c:\log\mylog will produce a file called mylog.log, which you can edit in any ASCII word processor. Variations: log using c:\log\mylog,append will add to existing file log using c:\log\mylog,replace will replace existing file log close will close log file (can reopen with append) restricts commands to those cases that fulfill condition: e.g., sum var1 if partyid==1 (note two equal signs needed) will produce a summary (see below) of var1 only for partyid==1 (e.g., Democrats) restricts commands to ranges you specify: sum var1 in 1/20 will summarize only the first 20 cases of var1 produces a list of variables with format and labels produces a list of variables without format or labels will produce codebook of variable information (takes time!) will provide mini-histograms of data will provide summaries of data (means, sds, numbers of cases, max, min); sum varlist,detail will provide breakdowns by quartiles (If installed): lsum varlist will give you summary only for cases that are not missing for any variable. will print out all values of variables in varlist sorts variables in ascending order (If installed): sorts