Graphics Reference
In-Depth Information
sts graph, by(hormon)
This graph shows survival-time
estimates broken down by whether one
is in the treatment group or the control
group. The legend specifies the groups,
but we might want to modify the labels
as shown in the next example.
Uses hormone.dta & scheme vg s2c
Kaplan−Meier survival estimates, by hormon
0
500
1000
1500
2000
2500
analysis time
hormon = 0
hormon = 1
sts graph, by(hormon) legend(label(1 Control) label(2 Treatment))
We can use the legend() option to use
different labels within the legend. See
Options : Legend (287) for more details.
Uses hormone.dta & scheme vg s2c
Kaplan−Meier survival estimates, by hormon
0
500
1000
1500
2000
2500
analysis time
Control
Treatment
sts graph, by(hormon) legend(off)
text(.5 800 "Control", box) text(.8 1500 "Treatment", box)
To suppress the display of the legend,
we can use the legend(off) option.
Instead, we can use the text() option
to add text directly to the graph to
label the two lines; see
Options : Adding text (299) for more
information. We also use the box
option to surround the text with a box;
see Options : Textboxes (303) for more
details.
Uses hormone.dta & scheme vg s2c
Kaplan−Meier survival estimates, by hormon
Treatment
Control
0
500
1000
1500
2000
2500
analysis time
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