[R] get the value of a biplane
Rui Barradas
ruipbarradas at sapo.pt
Sun May 28 18:37:07 CEST 2017
Hello,
Since function splines::bs returns an object of class bs in order to
read the help page for function predict you need
?predict.bs
The syntax would be
## S3 method for class 'bs'
predict(object, newx, ...)
Please read that help page and maybe you'll get the answer you need.
Hope this helps,
Rui Barradas
Em 28-05-2017 15:51, Glenn Schultz escreveu:
> 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
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list