Graphics Reference
In-Depth Information
twoway dot close tradeday, msize(large) msymbol(O)
mfcolor(eltgreen) mlcolor(emerald) mlwidth(thick)
The dot command is similar to a
scatterplot but shows dotted lines for
each value of the
1400
-variable, making it
more useful when the
x
-values are
equally spaced. In this example, we
look at the closing price of the S&P 500
by trading day and make the markers
filled with eltgreen with thick emerald
outlines.
Uses spjanfeb2001.dta & scheme
vg blue
x
1350
1300
1250
0
10
20
30
40
Trading day number
2.2
Regression fits and splines
This section focuses on the twoway commands that are used for displaying fit values:
lfit , qfit , fpfit , mband , mspline ,and lowess . For more information, see [ G ] graph
twoway lfit ,[ G ] graph twoway qfit ,[ G ] graph twoway fpfit ,[ G ] graph twoway
mband , G ] graph twoway mspline , and [ G ] graph twoway lowess .Weu ethe
allstates data file, omitting Washington, DC , and show the graphs using the vg s2c
scheme.
twoway (scatter ownhome pcturban80) ( lfit ownhome pcturban80)
Here, we show a scatterplot of ownhome
by pcturban80 . In addition, we overlay
a linear fit lfit predicting ownhome
from pcturban80 . See
Twoway : Overlaying (87) if you would
like more information about overlaying
twoway graphs.
Uses allstatesdc.dta & scheme vg s2c
20.0
40.0
60.0
80.0
100.0
Percent urban
% who own home
Fitted values
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