Thank you, Terry. So in the spline model, how to do the interpretation for HR? For linear term, the HR can be interpreted as "comparing a person with age 65, for example, against mean age. But if there is no defined centering point in spline, what's the compared value when we do the interpretation?
Thank you very much again for your helps.! Carrie-- On Fri, Jan 25, 2013 at 10:06 AM, Terry Therneau <thern...@mayo.edu> wrote: > The normalization is the same as is found when you have type="terms" from > a gam model: each term is centered so that mean(predicted) = 0. For a > simple linear term beta*age this implies that the predicted value will be 0 > at the mean of age, for a polynomial or spline this does not translate to a > defined centering point. > > The key idea is that if you were to replace age with "age + 10" the figure > should not change. > > By the way, thanks for including such clear example code for your question. > > Terry T. > > ----- begin included message ---------- > > I have some questions about the predicted HR in coxph function including > psline covariate. > > If just fitting covariate as linear form, by default, the reference value > for each of predictions type (linear predictor, risk and terms) is the mean > covariate within strata. > > If the psline is specified for the covariate, what's the reference value > for the predictions? > I did some test code below: > ### > par(mfrow = c(1,3)) > test = coxph(Surv(time, status) ~ age, cancer) > test2 = coxph(Surv(time, status) ~ pspline(age, df=2), cancer) > test3 = coxph(Surv(time, status) ~ pspline(age, df=5), cancer) > pptest3=predict(test3, type="lp") > pptest2= predict(test2, type="lp") > pptest = predict(test, type="lp") > plot(cancer$age, exp(pptest)) > abline(v=mean(cancer$age)) > abline(h=1) > plot(cancer$age, exp(pptest2)) > abline(v=mean(cancer$age)) > abline(h=1) > plot(cancer$age, exp(pptest3)) > abline(v=mean(cancer$age)) > abline(h=1) > > In the first model, age is just fitted as linear, and in the plot, when HR > =1 when age equals to the mean of age. However, it's not the case when age > is fitted as using psline. > > So what are the reference value of age when psline is used? Any help or > idea will be very much appreciated! > > Best, > Carrie-- > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.