# Why I got different results using Proc Phreg with Counting process input style and regular input?

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:

Here is the counting process input style, these 2 are basically the same

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!

• try proc phreg data=ds; class covar; model (delay_entry,followup)*event(0) =covar; run; – user158565 Jul 22 '19 at 22:27
• 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? – Z.Gary Jul 23 '19 at 15:59

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.