ncs: Tool to build incidence and penalty matrices, which can be used to approximate smooth functions by natural cubic splines.
Description
ncs builds the incidence and penalty matrices.
Usage
ncs(xx, lambda)
Arguments
xx
the explanatory variable.
lambda
an optional positive value, which corresponds to the smoothing parameter.
Value
xxa matrix with the following attributes: incidence matrix, penalty matrix, smoothing parameter (if it has been specified), and another interest matrices.
References
Green, P.J. and Silverman, B.W. (1994) Nonparametric Regression and Generalized Linear Models, Boca Raton: Chapman and Hall.