precompute | R Documentation |
This function is an internal function to compute objects needed for fast implementation of the sandwich smoother. It is meant to be an internal function, so use this at your own risk.
precompute(B, P, m)
B |
A matrix of basis functions |
P |
A penalty matrix |
m |
Difference order of P-spline |
A list of needed objects
object = bspline(nbasis = 10)
# sequence to evaluate
evalarg = seq(0, 1, len = 11)
# penalty matrix
D = diffpen(object)
P = Matrix::crossprod(D)
B = predict(object, evalarg)
stuff = precompute(B, P, m = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.