Gu function

Tool to build the basis matrix and the penalty matrix of natural cubic splines.

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)

Arguments

  • t: the covariate.
  • knot: a integer value that represent the number of knots of the natural cubic spline.

Returns

nknot number of knots.

knots set of knots.

N basis matrix.

K penalty matrix.

Examples

t <- runif(1000) knot <- 6 N_gu <- Gu(t,knot)

References

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.

Author(s)

Carlos Alberto Cardozo Delgado cardozorpackages@gmail.com

  • Maintainer: Carlos Alberto Cardozo Delgado
  • License: GPL-3
  • Last published: 2022-09-04

Useful links