Hello,
I am trying to fit an parametric Weibull accelerated failure time (AFT) model using Lifereg. The data below is set up in counting process format because I have two covariates (Var1 and Var2) that are time-dependent. The actual time of VISIT is the variable TIME. After transforming the data into counting process format, I have TSTART and TSTOP to hold the beginning and end of an interval. The variable CENSOR indicates whether or not the event occur. Below is my SAS code using LIFEREG. Can anyone help with the following SAS code to reflect time varying covariate. The LIFEREG syntax that allows (tstart,tstop) does not seem to allow specifying censor variable. Any help will be appreciations. I am using SAS 9.4
Thanks
proc lifereg data=have;
class var1 var2;
model time*censor(0)= var1 var2 /dist=weibull;
run;
0 |
0 |
1 |
. |
. |
0 |
21 |
0 |
1 |
0 |
21 |
0 |
42 |
0 |
1 |
21 |
42 |
0 |
56 |
0 |
1 |
42 |
56 |
1 |
0 |
0 |
1 |
. |
. |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
1 |
0 |
. |
. |
0 |
21 |
1 |
0 |
0 |
21 |
0 |
42 |
1 |
0 |
21 |
42 |
0 |
63 |
1 |
0 |
42 |
63 |
0 |
84 |
1 |
0 |
63 |
84 |
0 |
105 |
1 |
0 |
84 |
105 |
0 |
126 |
1 |
0 |
105 |
126 |
0 |
147 |
1 |
0 |
126 |
147 |
0 |
168 |
1 |
0 |
147 |
168 |
0 |
189 |
1 |
0 |
168 |
189 |
0 |
210 |
1 |
0 |
189 |
210 |
0 |
231 |
1 |
0 |
210 |
231 |
0 |
252 |
1 |
0 |
231 |
252 |
0 |
273 |
1 |
0 |
252 |
273 |
0 |
294 |
1 |
0 |
273 |
294 |
0 |
315 |
1 |
0 |
294 |
315 |
0 |
336 |
1 |
0 |
315 |
336 |
0 |
357 |
1 |
0 |
336 |
357 |
0 |
360 |
1 |
0 |
357 |
360 |
1 |
0 |
1 |
0 |
. |
. |
0 |
21 |
1 |
0 |
0 |
21 |
0 |
42 |
1 |
0 |
21 |
42 |
0 |
63 |
1 |
0 |
42 |
63 |
0 |
84 |
1 |
0 |
63 |
84 |
0 |