Graphics Reference
In-Depth Information
graph hbar prev exp tenure ttl exp, ascategory over(age3)
This bar chart shows three
-variables,
but we use the ascategory option to
plot the different
y
mean of prev_exp
-variables as
categorical variables on the
y
34/37
mean of tenure
x
-axis. The
mean of ttl_exp
-axis are not bad,
but we might want to change them.
Uses nlsw.dta & scheme vg s2c
default labels on the
x
mean of prev_exp
38/41
mean of tenure
mean of ttl_exp
mean of prev_exp
42/46
mean of tenure
mean of ttl_exp
0
5
10
15
graph hbar prev exp tenure ttl exp, ascategory over(age3)
yvaroptions(relabel(1 "Previous Exp" 2 "Current Exp" 3 "Total Exp"))
If the three level-of-experience variables
were indicated by an over() option, we
would use the over(, relabel())
option to change the labels. Instead,
since we have treated the multiple
y
Previous Exp
34/37
Current Exp
Total Exp
Previous Exp
-variables as categories, we then use
yvaroptions(relabel()) to modify
the labels on the
38/41
Current Exp
Total Exp
-axis.
Uses nlsw.dta & scheme vg s2c
x
Previous Exp
42/46
Current Exp
Total Exp
0
5
10
15
graph hbar prev exp tenure ttl exp, ascategory
over(age3, relabel(1 "34-37 yrs" 2 "38-41 yrs" 3 "42-46 yrs"))
yvaroptions(relabel(1 "Previous Exp" 2 "Current Exp" 3 "Total Exp"))
This example is similar to the previous
example, but we have added a
relabel() option to the over()
variable as well. As before, we use
yvaroptions(relabel()) to modify
the labels for the multiple
Previous Exp
34−37 yrs
Current Exp
Total Exp
Previous Exp
-variables,
and then we also use the relabel()
option within the over() option to
change the labels for age .
Uses nlsw.dta & scheme vg s2c
y
38−41 yrs
Current Exp
Total Exp
Previous Exp
42−46 yrs
Current Exp
Total Exp
0
5
10
15
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