Description Usage Arguments Value References See Also
View source: R/getBsplineBasis.R
This function computes penalised cubic B-splines using the method proposed by Eilers & Marx (1996). The spline coefficients can be computed efficiently using sparse matrix algebra, as described in Sect. 2.3.3 of Green & Silverman (1994) and Appendix B of Ruppert, Wand & Carroll (2003).
1 | getBsplineBasis(V, n.b, pen, prec = 1e-08)
|
V |
a |
n.b |
the number of basis functions to use. |
pen |
the smoothing penalty hyperparameter. |
prec |
a constant scale factor. |
a list
containing:
basis
A dense nwl by n.b matrix containing the values of the basis functions.
precision
A sparse n.b by n.b dsCMatrix
, the inverse of the prior covariance.
distance
The distance between each knot (cm^{-1}).
knots
The knot locations.
Eilers, PHC & Marx, BD (1996) "Flexible smoothing with B-splines and penalties," Statist. Sci. 11(2): 89–121, doi: 10.1214/ss/1038425655
Green, PJ & Silverman, BW (1994) "Nonparametric Regression and Generalized Linear Models: a roughness penalty approach" Chapman & Hall, Boca Raton, FL, pp. 11–21.
Ruppert, D; Wand, MP & Carroll, RJ (2003) "Semiparametric Regression" CUP, Cambridge, UK, pp. 336–340.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.