Frequent Learner
Posts: 1

Cox Snell Residual Plots for Cox PH and AFT models

Hi everyone,

I want to know which cumulative hazard we will get when run the code for Cox-Snell Residual Plots.

Is it Kaplan-Meier(Green wood) method cumulative hazard or Nelson Aalen method cumulative hazard.

I am giving the code can anyone please help me which method cumulative hazard it has taken.

If it is taken for Kaplan Meier Method then how will get for Nelson Aalen method and vice versa.

SAS Code

/*Exponential Distribution*/

proc lifereg data=bc.data;
model survivaltimenew*DEATH(0)=recu mets clinstage par agegr/dist=exponential;
output out=csr1expo xbeta=xb cres=cr;
run;
proc lifetest data=csr1expo outsurv=surv1expo;
time cr*DEATH(0);
run;
data surv1expo1;
set surv1expo;
hkm=-log(survival);
run;
goptions reset=all;
title "Exponential Distribution";
symbol1 v=none i=join line=1 c=black ci=black;
symbol2 v=none i=join line=2 c=black ci=black;
axis1 label=(a=90 'Cumulative Hazard') minor=none;
axis2 label=('Cox-Snell Residuals') minor=none;
proc gplot data=surv1expo1;
plot (cr hkm)*cr/ overlay vaxis=axis1 haxis=axis2 noframe;
run;
quit;

/*Cox PH or Cox Regression*/
proc phreg data=bc.data;
model survivaltimenew*DEATH(0)=recu mets clinstage par agegr;
output out=coxph logsurv=h /method=ch;
run;
data coxph1;
set coxph;
h=-h;
cons=1;
run;
proc phreg data=coxph1;
model h*DEATH(0)=cons;
output out=ph logsurv=ls /method=ch;
run;
data ph1;
set ph;
haz=-ls;
run;
proc sort data=ph1;
by h;
run;
title "Cox PH Model";
axis1 minor=none;
axis2  minor=none label=(a=90);
symbol1 i=join c=black line=2;
symbol2 i=join c=black line=1;
proc gplot data=ph1;
plot haz*h =1 h*h=2 /overlay haxis=axis1 vaxis=axis2 noframe;
label haz="Cumulative Hazard";
label h="Cox-Snell Residuals";
run;

Hope to see get early reply and get this query solved by as soon as possible from SAS community

Regards

Sairam Pulipati

Discussion stats
• 0 replies
• 178 views
• 0 likes
• 1 in conversation