[R] Regression models w/ splines
tlumley at u.washington.edu
Mon Apr 12 16:13:33 CEST 2004
On Fri, 9 Apr 2004, Frank E Harrell Jr wrote:
> On Fri, 09 Apr 2004 15:16:34 -0500
> "John Fieberg" <John.Fieberg at dnr.state.mn.us> wrote:
> > Hi - I am fitting various Cox PH models with spline predictors. After
> > fitting the model, I would like to use termplot() to examine the
> > functional form of the fitted model (e.g., to obtain a plot of the
> > relative risk (or log r.r.) versus the predictors).
> This kind of application is why the Design package was created. It is
> very easy to obtain such plots:
It's actually very easy with termplot(), it's just that there was a bug in
predict.coxph() in handling single-term models.
The version of survival that comes with 1.9.0 should work (and for Frank,
it exports the other internal functions you wanted).
More information about the R-help