[R] spline basis
Glenn Schultz
glennmschultz at me.com
Mon Jun 22 22:09:07 CEST 2015
I have the following code which creates a spline function
x <- c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360)
y <- c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50)
Baseline <- cbind(x,y)
Turnover <- splinefun(Baseline[,1], Baseline[,2], method = "natural")
plot(Turnover(seq(1, 360, 1)), type = "l")
If I change the Y ordinates the spline changes accordingly. However, the code is the same on inspection. Thus, I figure the basis must be stored somewhere. I have look through the documentation and cannot find its location. Can anyone enlighten me on what is going on and where I can find the basis matrix?
More information about the R-help
mailing list