I recently use different time-based to model cox proportional model.
I have read some papers that the counting process should be the same results as it does in only one survival time variable.
However, I found something wrong here.
In my following example, if i use the counting process, the group 1 and group 2 are actually the same data, but with different time scale. The t1 and t 2 variables in the group 2 have a different time-based, so the t1 and t2 plus the time_shift is the t1 and t2 in the group 2 with the same id.
So, the two groups have the same period of t1 to t2, and the same id, drug use, and outcome (i.e., hypertension).
However, if i use the counting process, i will get a different HR (for group 1 and group, i.e., 2, 1.07 and 2.26, respectively).
When i use hte time-on-study, i will get another different estimate, 1.19, but they are the same in the two groups.
I tried to replicate in the R, the results are the estiamtes are the same in counting process or time-on-study, they are 2.26 and 1.19, although they are still different in counting process and time-on-study.
Can anyone explain why they are different?
data t;
INPUT g id hypertension t1 t2 drug time time_shift;
cards;
1 1 0 21916 24940 1 3024 16699
1 2 1 21916 21976 0 60 14510
1 3 0 21916 27089 0 5173 14550
1 4 1 21916 23765 0 1849 17177
1 5 1 21916 23067 0 1151 14896
1 6 0 21916 21949 0 33 17837
1 6 0 21949 23802 1 1853 17837
1 7 1 21916 22999 1 1083 18612
1 8 1 21916 24659 0 2743 16401
1 9 0 21916 22006 0 90 19633
1 10 0 21916 23691 0 1775 17948
1 11 1 21916 22470 0 554 14488
1 12 0 21916 24201 0 2285 16684
1 12 0 24201 24955 1 754 16684
1 13 0 21916 21951 0 35 17085
1 13 0 21951 24554 1 2603 17085
1 14 0 21916 21946 0 30 16824
1 14 1 21946 24625 1 2679 16824
1 15 0 21916 22422 0 506 17888
1 15 0 22422 23751 1 1329 17888
1 16 0 21916 23628 0 1712 18011
1 17 0 21916 23896 0 1980 17743
1 18 1 21916 23275 1 1359 16971
1 19 0 21916 21961 0 45 16993
1 19 1 21961 23665 1 1704 16993
1 20 1 21916 22364 1 448 17821
2 1 0 38615 41639 1 3024 0
2 2 1 36426 36486 0 60 0
2 3 0 36466 41639 0 5173 0
2 4 1 39093 40942 0 1849 0
2 5 1 36812 37963 0 1151 0
2 6 0 39753 39786 0 33 0
2 6 0 39786 41639 1 1853 0
2 7 1 40528 41611 1 1083 0
2 8 1 38317 41060 0 2743 0
2 9 0 41549 41639 0 90 0
2 10 0 39864 41639 0 1775 0
2 11 1 36404 36958 0 554 0
2 12 0 38600 40885 0 2285 0
2 12 0 40885 41639 1 754 0
2 13 0 39001 39036 0 35 0
2 13 0 39036 41639 1 2603 0
2 14 0 38740 38770 0 30 0
2 14 1 38770 41449 1 2679 0
2 15 0 39804 40310 0 506 0
2 15 0 40310 41639 1 1329 0
2 16 0 39927 41639 0 1712 0
2 17 0 39659 41639 0 1980 0
2 18 1 38887 40246 1 1359 0
2 19 0 38909 38954 0 45 0
2 19 1 38954 40658 1 1704 0
2 20 1 39737 40185 1 448 0
;
proc phreg data=t COVS (AGGREGATE);
model (t1, t2) * hypertension (0) = drug/risklimits;
id id;
by g;
run;
proc phreg data=t COVS (AGGREGATE);
model time * hypertension (0) = drug/risklimits;
id id;
by g;
run;
... View more