Graphics Reference
In-Depth Information
twoway (scatter ownhome propval100)
(scatteri 42.6 62.1 "DC" 55.9 89 (8) "HI") , legend(off)
This graph extends the previous
example by adding a second point for
Hawaii and providing a position for the
marker label for Hawaii, placing it at
the 8 o'clock position. In addition, the
legend(off) option suppresses the
legend. Finally, this graph uses the
vg samec scheme, so the markers
created via scatteri look identical to
the other markers.
Uses allstates.dta & scheme vg samec
HI
DC
0
20
40
60
80
100
This section concludes by looking at some additional graph commands that make graphs
similar to twoway scatter , namely, twoway spike , twoway dropline ,and twoway dot .
Most of the options we have illustrated before apply to these graphs as well, so they will
not be repeated here. We will switch to using the vg blue scheme for the rest of the graphs
in this section.
twoway scatter r yhat
Imagine that we ran a regression
predicting propval100 from urban and
generated the residual, calling it r ,and
the predicted value, calling it yhat .
Consider this graph using the scatter
command to display the residual by the
predicted value.
Uses allstates.dta & scheme vg blue
60
40
20
0
−20
−40
0
20
40
60
yhat propval100|urban
The electronic form of this topic is solely for direct use at UCLA and only by faculty, students, and staff of UCLA.
Search WWH ::




Custom Search