Graphics Reference
In-Depth Information
twoway scatter fv ownhome propval100, connect(l i) sort
We can show both the observations and
the fit values in one graph. The
connect(l i) option specifies that the
first
-variable should be connected
with straight lines ( l for line) and the
second
y
-variable should not be
connected ( i for invisible connection).
Uses allstates.dta & scheme vg past
y
0
20
40
60
80
100
% homes cost $100K+
yhat ownhome|propval100
% who own home
twoway scatter fv ownhome propval100, msymbol(i .)
connect(l i)
sort
The msymbol(i .) option specifies
that the first
-variable should not have
symbols displayed ( i for invisible
symbol) and that the second
y
-variable
should have the default symbols
displayed.
Uses allstates.dta & scheme vg past
y
0
20
40
60
80
100
% homes cost $100K+
yhat ownhome|propval100
% who own home
twoway scatter fv ownhome propval100, msymbol(i .)
connect(l i)
sort legend(label(1 Pred.
Perc.
Own))
The legend() option can be used to
control the legend. We use the label()
option to specify the contents of the
first item in the legend. See
Options : Legend (287) for more details
on legends.
Uses allstates.dta & scheme vg past
0
20
40
60
80
100
% homes cost $100K+
Pred. Perc. Own
% who own home
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