Etude

3708 mots 15 pages
Brief Guide to STATA Commands Eric M. Uslaner December, 1999

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

en relation

  • Etude
    1543 mots | 7 pages
  • Etude
    350 mots | 2 pages
  • Etude
    468 mots | 2 pages
  • Etude
    628 mots | 3 pages
  • Etude
    1280 mots | 6 pages
  • Etude
    342 mots | 2 pages
  • Etude
    1073 mots | 5 pages
  • Etude
    395 mots | 2 pages
  • Etude
    793 mots | 4 pages
  • Etude
    1452 mots | 6 pages
  • Etude
    361 mots | 2 pages
  • Etude
    376 mots | 2 pages
  • Etude
    1523 mots | 7 pages
  • Etude
    695 mots | 3 pages
  • Etude
    1704 mots | 7 pages