<html><h1>kmslide</h1><img src="kmslide.gif"><p>
<a href="gall.using.html">How to download and try this example</a><br>
<pre><b>Usage: pl -gif kmslide.htm
Note: the simplistic technique used herein for coloring the
overlapping ranges only works when one range is always below the other.
<hr></b>
#proc page
linewidth: 2
textsize: 11
backgroundcolor: darkblue
color: white
pagesize: 6.6 4.4
#if @DEVICE in gif,png
scale: 0.7
#endif
// <b> Set up plotting region using <a href="../doc/areadef.html">proc areadef</a></b>
#proc areadef
title: Kaplan-Meier Example\nProtocol 2M\n10-31-99
titledetails: size=14 align=C
areaname: slide
// 'slide' is equivalent to: lower left at 1 0.7 and upper right at 5.85 3.2
yrange: 0 1
xrange: 0 60
xaxis.stubs: incremental 6
xaxis.label: Months
yaxis.stubs: incremental 0.1
yaxis.stubformat: %3.1f
// <b> Get data (from end of this file) using <a href="../doc/getdata.html">proc getdata</a></b>
#proc getdata
#intrailer
// <b> do the blue range using <a href="../doc/rangesweep.html">proc rangesweep</a></b>
#proc rangesweep
xfield: 1
lofield: 3
hifield: 4
color: powderblue
legendlabel: 95% CI Group A
// <b> do the pink range using <a href="../doc/rangesweep.html">proc rangesweep</a></b>
#proc rangesweep
xfield: 1
lofield: 6
hifield: 7
color: pink
legendlabel: 95% CI Group B
// <b> do the yellow range which shows overlap using <a href="../doc/rangesweep.html">proc rangesweep</a></b>
#proc rangesweep
xfield: 1
lofield: 6
hifield: 4
color: rgb(0.8,1,0.8)
legendlabel: Overlap of CIs
// <b> now do the curves last so they come out on top of ranges..</b>
// <b> do the blue curve using <a href="../doc/lineplot.html">proc lineplot</a></b>
#proc lineplot
xfield: 1
yfield: 2
linedetails: color=blue
legendlabel: Group A
// <b> do the red curve using <a href="../doc/lineplot.html">proc lineplot</a></b>
#proc lineplot
xfield: 1
yfield: 5
linedetails: color=red
legendlabel: Group B
// <b> render the legend using <a href="../doc/legend.html">proc legend</a></b>
#proc legend
location: max-1 max
seglen: 0.2
specifyorder:
Group A
95% CI Group A
Group B
95% CI Group B
Overlap
// <b> here is the data... </b>
#proc trailer
data:
// T val1 lo1 hi1 val2 lo2 hi2
0 1 1 1 1 1 1
1 0.993 0.986 1.000 0.9895 0.981 0.998
2 0.9915 0.984 0.999 0.98 0.968 0.992
3 0.9845 0.974 0.995 0.972 0.958 0.986
4 0.9725 0.959 0.986 0.9625 0.946 0.979
5 0.937 0.916 0.958 0.9285 0.906 0.951
6 0.892 0.865 0.919 0.884 0.856 0.912
8 0.8335 0.801 0.866 0.8365 0.804 0.869
10 0.78 0.744 0.816 0.782 0.746 0.818
12 0.741 0.703 0.779 0.7585 0.721 0.796
14 0.6855 0.645 0.726 0.726 0.687 0.765
16 0.6565 0.615 0.698 0.6945 0.654 0.735
18 0.628 0.586 0.670 0.6595 0.618 0.701
20 0.607 0.564 0.650 0.6385 0.596 0.681
22 0.5685 0.525 0.612 0.6155 0.572 0.659
24 0.561 0.517 0.605 0.6035 0.560 0.647
26 0.536 0.491 0.581 0.569 0.524 0.614
28 0.514 0.469 0.559 0.539 0.493 0.585
30 0.497 0.451 0.543 0.5155 0.469 0.562
32 0.474 0.427 0.521 0.509 0.465 0.553
34 0.4635 0.416 0.511 0.4885 0.441 0.536
36 0.444 0.396 0.492 0.469 0.420 0.518
38 0.444 0.396 0.492 0.442 0.391 0.493
40 0.424 0.374 0.474 0.4365 0.385 0.488
42 0.4115 0.360 0.463 0.4305 0.379 0.482
44 0.403 0.350 0.456 0.4235 0.371 0.476
46 0.3865 0.331 0.442 0.415 0.361 0.469
48 0.3755 0.318 0.433 0.394 0.335 0.453
50 0.356 0.290 0.422 0.394 0.335 0.453
syntax highlighted by Code2HTML, v. 0.9.1