Introduction to Stata 8
Introduction to Stata 8
Introduction to Stata 8
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Notation in this booklet<br />
<strong>Stata</strong> commands are shown like this:<br />
tabulate agegr sex , chi2<br />
tabulate and chi2 are <strong>Stata</strong> words, shown with italics, agegr and sex is variable<br />
information, shown with ordinary typeface.<br />
In the output examples you will often see the commands preceded by a period:<br />
. tabulate agegr sex , chi2<br />
This is how commands look in output, but you should not type the period yourself when<br />
entering a command.<br />
Optional parts of commands are shown in light typeface and enclosed in light typeface square<br />
brackets. Square brackets may also be part of a <strong>Stata</strong> command; in that case they are shown in<br />
the usual bold typeface. Comments are shown with light typeface:<br />
save c:\dokumenter\proj1\alfa1.dta [ , replace]<br />
summarize bmi [fweight=pop] // Weights in square brackets<br />
In the examples I use c:\tmp as my folder for temporary files.<br />
In the <strong>Stata</strong> manuals it is assumed that you use c:\data for all of your <strong>Stata</strong> files. I strongly<br />
discourage that suggestion. I am convinced that files should be s<strong>to</strong>red in folders reflecting the<br />
subject, not the program used; otherwise you could easily end up confused. You will therefore<br />
see that I always give a full path in the examples when opening (use) or saving files (save).<br />
Throughout the text I use <strong>Stata</strong>'s style <strong>to</strong> refer <strong>to</strong> the manuals:<br />
[GSW] Getting Started with <strong>Stata</strong> for Windows<br />
[U] User's Guide<br />
[R] Base Reference manual (4 volumes)<br />
[G] Graphics manual<br />
[ST] Survival analysis and epidemiological tables<br />
See more on manuals in appendix 1.<br />
2