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

______________________________________________
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.

Reply via email to