Tool to build the basis matrix and the penalty matrix of natural cubic splines.
Gu
builds the basis matrix and penalty matrix to approximate a smooth function using natural cubic splines based on the Gu basis form.
Gu(t, knot)
t
: the covariate.knot
: a integer value that represent the number of knots of the natural cubic spline.nknot number of knots.
knots set of knots.
N basis matrix.
K penalty matrix.
t <- runif(1000) knot <- 6 N_gu <- Gu(t,knot)
Wood, S. (2006) Generalized additive models: An R introduction. Chapman and Hall.
Carlos Alberto Cardozo Delgado. Semi-parametric generalized log-gamma regression models. Ph. D. thesis. Sao Paulo University.
Carlos Alberto Cardozo Delgado cardozorpackages@gmail.com
Useful links