0
$\begingroup$

I am new to survival analysis and now trying to learn counting process input style. I am using the same dataset, but when using proc phreg, the couting process input and regular input is very different. Here is my first several lines in the dataset:

The regular one:

enter image description here

Here is the counting process input style, these 2 are basically the same enter image description here

here is the code:

Proc phreg data=ds; class covar; model followup*event(0)=covar / entry=delay_entry; run;

proc phreg data=ds; class covar; model (start, end)*event(0)=covar; run;

Why the results are so different? Any idea would be appreciated. Thank you!

$\endgroup$
  • $\begingroup$ try proc phreg data=ds; class covar; model (delay_entry,followup)*event(0) =covar; run; $\endgroup$ – user158565 Jul 22 '19 at 22:27
  • $\begingroup$ Wow, that works! Thank you So much!!!Would you mind to explain to me why this is happening? the interval of (delay_entry,followup) and (Start, end) are the same, what's the story behind this issue? $\endgroup$ – Z.Gary Jul 23 '19 at 15:59
0
$\begingroup$

In Cox proportional hazard model, there is unspecified baseline hazard function $\lambda_0(t)$. It is not constant and is the function of time. For subject id=11, the first table says the subject went through from $t_1 = 62$ to $t_2=243$. So the subject should has the hazard $\lambda_0(t)exp(X\beta)$, for $ t=62 \text{ to } 243$. From table 2, the subject has the hazard $\lambda_0(t)exp(X\beta)$, for $ t=0 \text{ to } 181$.

Because $\lambda_0(t)$ is not a constant, so in this case $\lambda_0(0) \ne \lambda_0(62)$. Therefore, your two statements fit two different models.

In SAS, model t2*event(0)=X / entry=t1; and model (t1, t2)*event(0)=X are the exact same if you use them on the same dataset. If you replace the first model by Proc phreg data=ds; class covar; model end*event(0)=covar / entry=end; run;, you will get the same results generated by your second model.

$\endgroup$
  • $\begingroup$ Thank you So much. This is really helpful. I was shifting all the timelines by transforming data to the second table, and eventually create a different study. Thanks again! $\endgroup$ – Z.Gary Jul 23 '19 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.