/* --------------------------------------------------------------- program: heart0-v92.sas xref: Stanford Heart Transplant Data input: heart2.dat output: does: Time dependent covariate --------------------------------------------------------------- */; OPTIONS PS=68 LS=120 PAGENO=1 NODATE NOCENTER ERRORS=3; filename INF "h:\bios180\coursepack\SAS-unc-workshop-2008\heart2.dat"; *******************************************************; data A; infile INF delimiter=':'; input id year age delta survtime surg trans waittime match1 match2 match3; run; **********************************************************; ** Use transplant status as a time dependent covariate ; **********************************************************; proc phreg data=A; model survtime*delta(0)=xtrans; if (waittime>survtime or waittime=.) then xtrans=0; else xtrans=1; run; *****************************************************; ** Now compare this to non-time-dependent estimate ; ** of the RR associated with transplant ; *****************************************************; proc phreg data=A; model survtime*delta(0)=trans; run; ********************************************************************; ** This model indicates that a heart transplant is very protective. ; ** Why is the difference from the TDC model? Which is better? ; **********************************************8*********************;