Re: [R] predict with model (rms package)

2011-06-08 Thread Mark Seeto
Thanks for your reply, Frank. I've noticed that the x.knots object doesn't actually have to be the vector of knots. Just having x.knots <- 0 or even x.knots <- "a" will allow predict to work. Mark Seeto Frank Harrell wrote: > > This is a consequence of predict.ols calling predictrms which relie

Re: [R] predict with model (rms package)

2011-06-08 Thread Frank Harrell
This is a consequence of predict.ols calling predictrms which relies on model.frame which re-issues the expression of x.knots. You would have the same problem if using update(fit object) in another session. For that reason you have to keep an external knots vector available in your environment.

[R] predict with model (rms package)

2011-06-07 Thread Mark Seeto
Dear R-help, In the rms package, I have fitted an ols model with a variable represented as a restricted cubic spline, with the knot locations specified as a previously defined vector. When I save the model object and open it in another workspace which does not contain the vector of knot locations,