I have a following model:
coxph(Surv(fulength, mortality == 1) ~ pspline(predictor))
where is fulength is a duration of follow-up (including mortality), predictor is a predictor of mortality.
The output of the command above is this:
coef se(coef) se2 Chisq DF p
pspline(predictor), line 0.174 0.0563 0.0562 9.52 1.00 0.002
pspline(predictor), nonl 4.74 3.09 0.200
How can I plot this model so that I get the nice curvy line with 95% confidence bands and hazard ratio on the y axis? What I am aiming for is something similar to this:
install.packages(c("Hmisc","rms"), dependencies=TRUE )
. I do not recognize the package that is being reported as missing. I suspect a syntax error on your part. – Antiphon