[R] survival::predict.coxph
Bernhard Reinhardt
bernhard.reinhardt at dlr.de
Thu Feb 26 13:18:55 CET 2009
Hi,
I just came across another question concerning predict.coxph
Terry Therneau states in "A Package for Survival Analysis in S" that
term <- predict(fit, type="terms")
yields predicted values for the individual components of the linear
predictor X*beta
My coxmodel looks like:
coef exp(coef) se(coef) z p
S0 -3.106 4.48e-02 2.88 -1.080 0.2800
S1 6.365 5.81e+02 5.20 1.224 0.2200
S2 -14.009 8.24e-07 5.32 -2.636 0.0084
[..]
The first line of my input-data looks like:
S0 S1 S2 S3
1 -1.030 -0.9500 -1.0950 -1.0700
So I thought the first line of term should be calculated by
-1.030*-3.106, -0.9500*6.365, -1.0950*-14.009 [..] which is
3.20, -6.04, 15.34
Actually the first line of term contains:
S0 S1 S2
1 3.36737346 -6.36032595 15.73846097
which is quite similar but not the same.
Can anyone shed some light on this? I guess there must be tons of
literature on this topic but I find it quite hard to find the good one.
I´d also appreciate literature on how to choose the appropriate number
of covariates for a coxmodel and overfitting.
Regards
Bernhard
More information about the R-help
mailing list