10-08-2015 09:44 AM
I have a dataset with two groups (treatment=YES and treatment=NO) and time to failure
I am trying to create a cumhaz plot in PROC PHREG where treatment YES and NO are presented in two separate plots but in the same graph.
I have tried to use stratum/bystatum but I only get a compined hazard plot for both treatment groups.
Does anyone know what I am doing wrong? I post my code below
ODS graphics on;
proc phreg data = MY_DATA plots(overlay=stratum)=cumhaz;
model time*fail(0)=trt ps /rl ;
ODS graphics off;
Thanks in advance!
10-08-2015 10:00 AM
I might be misunderstanding, but try OVERLAY=ROW:
proc phreg data=LBW plots(overlay=row)=cumhaz; model Time*Low(0)= LWT Smoke HT UI / ties=discrete; strata Age; run;
The various options are documented in the PROC PHREG statement.