Graphics Reference
In-Depth Information
graph dot tenure, over(occ5) over(collgrad) over(married) linegap(30)
legend(rows(1) span)
This example is the similar to the
previous one, but we have added the
linegap(30) option to make the levels
of occ5 display on separate lines,
making the results more readable. We
have also added a legend() option to
make the legend display in one line and
span the width of the graph.
Uses nlsw.dta & scheme vg s2c
not college grad
single
college grad
not college grad
married
college grad
0
2
4
6
8
10
mean of tenure
Prof/Mgmt
Sales
Clerical
Labor/Ops
Other
6.7
Graphing by groups
This section discusses the use of the by() option in combination with graph dot .Nor-
mally, you would use the over() option instead of the by() option, but in some cases, the
by() option is either necessary or more advantageous. For example, a by() option is useful
if you exceed the maximum number of over() options (three if you have a single
y
-variable
or two if you have multiple
-variables). In such cases, the by() option allows you to break
your data down by additional categorical variables. by() also gives you more flexibility in
the placement of the separate panels. For more information about the by() option, see
Options : By (272), and for more information about the over() option, see Dot : Yvars and
over (193). The examples in this section use the vg s1m scheme.
y
graph dot wage, over(collgrad) over(occ5) over(urban2)
Consider this dot graph breaking wages
down by three categorical variables. If
we wanted to break this down further
by another categorical variable, we
could not use another over() option
since we can have a maximum of three
over() options with a single
Prof/Mgmt
Sales
Rural
Clerical
Labor/Ops
Other
Prof/Mgmt
Sales
y
-variable.
Uses nlsw.dta & scheme vg s1m
Metro
Clerical
Labor/Ops
Other
0
5
10
15
mean of wage
not college grad
college grad
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