Programming the statistical procedures from SAS

Cumhaz plot in PROC PHREG

Reply
Contributor
Posts: 73

Cumhaz plot in PROC PHREG

Hi,

 

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 ;
strata=trt;
run;
ODS graphics off;

 

 

Thanks in advance!

Thomas

SAS Super FREQ
Posts: 3,547

Re: Cumhaz plot in PROC PHREG

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.

 

Ask a Question
Discussion stats
  • 1 reply
  • 197 views
  • 0 likes
  • 2 in conversation