Reputation: 59
Hi all, I hope you can help me on this problem.
I am using the ns(...)
command in R to generate a base of natural splines, including
T
Let's say as an example, ns(1:20, knots=9, Boundary.knots=c(1,15), intercept=T)
.
I have some questions that I'm struggling a lot to solve by myself, namely:
Thank you very much for all your help with this, you would help me a lot!
Best, EM
Upvotes: 0
Views: 1565
Reputation: 1
For a natural spline the number of basis is equal to the number of knots. Useful reference https://stats.stackexchange.com/questions/172217/why-are-the-basis-functions-for-natural-cubic-splines-expressed-as-they-are-es
The natural spline constraint is that s''(first knot)=0 and s''(last knot)=0
To enforce s' = 0 as you want - would not be a natural spline
Upvotes: 0