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