Programming the statistical procedures from SAS

PHREG procedure, Counting Process Style of Input

Reply
N/A
Posts: 1

PHREG procedure, Counting Process Style of Input

Dear All,

I am getting acquainted with the PHREG procedure (sas9.2). Before applying the procedure to my data, I am going through the examples.

I need to use time-dependant variable in my derivation. I thus looked at the example 64.6 (http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_phreg_sect03...)

I tried to re-write the code so that I could use the counting process style of input as the latter would more easily fit the data I have. I created the appropriate data-set as follow:

PROC SQL;

CREATE TABLE HEART2 AS

SELECT id, 0 AS TIME1,

WHEN WaitTime = . or Time < WaitTime THEN TIME ELSE WAITTIME AS TIME2, 0 AS XSTATUS FROM HEART)

UNION

SELECT ID, WAITTIME AS TIME1, TIME AS TIME2, STATUS, ACC_AGE, 1 AS XSTATUS FROM HEART WHERE WAITTIME NE . AND TIME>WAITTIME)

ORDER BY ID;

quit;

This way, every ID has an entry until death/censoring or transplant, whatever comes first. ID that received transplants have a second entry from the date of the transplant to death/censoring. It seems to me that it follows failry similarly the counting process example described in the guide

I then ran the proc phreg the way it is in the example and the way that would fit the "counting process style of input" of the new dataset:

proc phreg data= Heart;

model Time*Status(0)= XStatus Acc_Age;

if (WaitTime = . or Time < WaitTime) then XStatus=0.;

else  XStatus= 1.0;

run;

phreg data= Heart2;

model (Time1,Time2)*Status(0)= XStatus Acc_Age;

run;

the result I get are, however, very different. I also tried to run both regressions with only acc_age as regressor, but, again, i got different results.
I could not quite understand how the two calculation methods vary, from the SAS guide.

Is there anyone who could shed some ligth on the matter?

Thanks

Davide

Ask a Question
Discussion stats
  • 0 replies
  • 125 views
  • 0 likes
  • 1 in conversation