|
|
|
||||
|
|
|||||
This page presents examples of graphics programs written by ATS stat consultants. You can obtain these programs by typing, findit command_name, into the Stata command line and following the instructions (see How can I use the findit command to search for programs and get additional help? for more information about using findit).This page contains only the commands and the plots themselves, there is no further explanation. We envision that users will look through the plots and when they find one that appears to do what they want, they will download the program and carefully read the help files.
Most of these examples use the hsb2 dataset which can be downloaded from within Stata using the following command:
use http://www.ats.ucla.edu/stat/stata/notes3/hsb2, clear
Note: Most of the graphs were produced using the scheme lean1. Whenever a different scheme is used, it is given in the command.
chidemo 8
fdemo 4 32
histbox write, mean start(30) width(5)
meansdplot math prog, outer(2) xlab(1 "gen" 2 "acad" 3 "voc") ytitle(math score)egen grp = group(prog female) meansdplot write grp, outer(2) /// xlab(1 "m-gen" 2 "f-gen" 3 "m-acad" 4 "f-acad" 5 "m-voc" 6 "f-voc") ytitle(writing score)
meansdplot write prog, outer(2) xlab(1 "gen" 2 "acad" 3 "voc") ytitle(writing score) mlabel(female)
use http://www.ats.ucla.edu/stat/stata/notes/lahigh, clear nbvargr datsabs
xi3: regress read i.female*socst ses science postgr3 socst, by(female) scheme(s2mono)
profileplot read write math science, by(schtyp))profileplot read write math science if schtyp==2, by(id) msymbol(i) legend(off)
tdemo 4
zdemo -1 1
zdemo2 50 5 60 10
ztail .05 1ztail .05 2
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services