[R] Question about splines in R

David Winsemius dwinsemius at comcast.net
Mon Oct 4 09:30:14 CEST 2010


Have you looked at lrm in rms? Harrell uses restricted cubic splines,  
but my understanding (subject to correction by my statistical betters)  
is that these are the same as natural cubic splines. The penalty  
matrix is returned as part of the fit object after being constructed  
and the model fit. You have the option of specifying knot locations or  
allowing these to be estimated.

require(rms)
?lrm
?pentrace

Option 2,,, try one of the many methods for searching?

RSiteSearch("penalized logistic")

... returned 95 hits

-- 
David Winsemius, MD

On Oct 4, 2010, at 1:44 AM, Yan Li wrote:

> Dear all,
>
> I wanted to fit a penalized logistic model to obtain knots-based basis
> matrix as well as basis coefficients. I was wondering if there is a
> package in R that can generate a natural cubic spline and construct
> the corresponding penalty matrix?
>
> Thank you!
>
> Yan



More information about the R-help mailing list