Skip to content
Prev 175648 / 398503 Next

How to generate natural cubic spline in R?

Hi David,

David Winsemius schrieb:
That sounds good, didn't know that... rcs() has the advantage of coming 
with a book (Harrell's "Regression Modeling Strategies").
Nope, but you can include rcs() within fitting functions, 
lm(foo~rcs(bar,3)), which makes more sense to me than having a spline 
function fit... Looks like better encapsulation to me.

Best,
Stephan