Hello,
I'm working with a large database with aneurysm operations and want yearly
hazards post op for different age groups.
I get cummulative survival (excluding the first month) with:
First model
basal.op.surv <- coxph(Surv(I(time-30), event) ~ age, data = el.aaa[el.aaa$sex
== 'male' & el.aaa$time > 30,])
summary(survfit(basal.op.surv, newdata = data.frame(age = 66:80)), times =
365.25 * 1:8)
output
Call: survfit.coxph(object = basal.op.surv, newdata = data.frame(age = 66:80))
time n.risk n.event survival1 survival2 survival3 survival4 survival5
survival6 survival7 survival8 - etc
365 2663 169 0.958 0.956 0.954 0.951 0.949
0.946 0.943 0.940 -
730 2187 132 0.920 0.916 0.911 0.907 0.902
0.897 0.892 0.886 -
1096 1714 134 0.873 0.866 0.860 0.853 0.845
0.838 0.829 0.821 -
1461 1339 106 0.827 0.818 0.809 0.800 0.790
0.780 0.770 0.759 -
1826 927 106 - - - -
- - - - -
- - - - - - -
- - - - -
etc
Second model
basal.op.surv <- coxph(Surv(I(time-30), event) ~ age, data = el.aaa[el.aaa$sex
== 'male' & el.aaa$time > 30,])
for (i in 65:66) print(summary(survfit(basal.op.surv, newdata = data.frame(age
= i)), times = 365.25 * 1:5))
output
Call: survfit.coxph(object = basal.op.surv, newdata = data.frame(age = i))
time n.risk n.event survival std.err lower 95% CI upper 95% CI
365 2663 169 0.961 0.00338 0.954 0.967
730 2187 132 0.924 0.00517 0.914 0.934
1096 1714 134 0.879 0.00713 0.865 0.893
1461 1339 106 0.835 0.00891 0.817 0.852
1826 927 106 0.778 0.01104 0.756 0.800
Call: survfit.coxph(object = basal.op.surv, newdata = data.frame(age = i))
time n.risk n.event survival std.err lower 95% CI upper 95% CI
365 2663 169 0.958 0.00346 0.952 0.965
730 2187 132 0.920 0.00521 0.910 0.930
1096 1714 134 0.873 0.00709 0.859 0.887
1461 1339 106 0.827 0.00877 0.810 0.844
1826 927 106 0.767 0.01080 0.746 0.788
How can I get yearly hazard with std error for each year?
Sincerely Fredrik Lundgren
|