Here is an example of using PROC LIFETEST using techniques fromhttp://support.sas.com/documentation/onlinedoc/stat/142/kaplan.pdf . I also show an SG annotation example, but outside the context of a KM plot.
data _null_;
%let url = //support.sas.com/documentation/onlinedoc/stat;
infile "http:&url/ex_code/143/templft.html" device=url;
file 'macros.tmp';
input;
_infile_ = tranwrd(_infile_, '&', '&');
_infile_ = tranwrd(_infile_, '<' , '<');
if index(_infile_, '</pre>') then pre = 0;
if pre then put _infile_;
if index(_infile_, '<pre>') then pre + 1;
run;
%inc 'macros.tmp' / nosource;
%ProvideSurvivalMacros
%macro StmtsBeginGraph;
* Coordinates are ad hoc, and there are many
available coordinate systems.
See the documentation for more information.;
drawtext textattrs=(weight=Bold) 'CD4<100 cells/(*ESC*){unicode mu}L' /
x=8 y=14 width=20;
%mend;
%CompileSurvivalTemplates
ods html body='b.html';
ods graphics on;
proc lifetest data=sashelp.BMT
plots=survival(atrisk outside maxlen=13);
time T * Status(0);
strata Group;
run;
data anno;
label = 'CD4<100 cells/(*ESC*){unicode mu}L';
function = 'text';
drawspace = 'GraphPercent';
x1 = 15;
y1 = 5;
width = 25;
run;
proc sgplot data=sashelp.class sganno=anno;
scatter y=weight x=height;
run;
ods html close;
... View more