[R] get the value of a biplane

Glenn Schultz glennmschultz at me.com
Sun May 28 16:51:42 CEST 2017


If is specify a spline basis as follows

knots <- c(6, 12, 22, 30, 35)
x <- c(0.0, .25, 1.0, 2.0, 3.0)
SCurve <- bs(x = x, knots = knots, intercept = FALSE, Boundary.knots = c(0,3.5))

I would like to now get the spline value for new values of x.  However, when I use predict the new basis is returned and I would like to get the value.  Nothing has worked so far and ?predict plus examples only show prediction from linear models.  Is there a way to extract the value from a defined spline?

Best Regards,
Glenn


More information about the R-help mailing list