rcs: Restricted Cubic Splines

Description Usage Arguments Details Value Author(s) References See Also

View source: R/auxiliar_functions.r

Description

Generate the Restricted cubic spline basis matrix for a polynomial spline.

Usage

1

Arguments

x

The predictor variable.

m

Spline order (number of nodes).

knots

Internal breakpoints that define the spline.

scale

logical; if scale = TRUE, the columns of the basis are scaled to have the same variability.

Details

The base matrix columns are scaled for optimization purposes. If not provieded, internal knots are determined using quantiles of x.

Value

Returns the basis matrix for the restricted cubic spline.

Author(s)

Fernando Massa, fmassa@iesta.edu.uy

References

\insertRef

durrelman1989raschreg

See Also

predict.rcs


nando11235813/raschreg documentation built on Oct. 2, 2021, 3:11 p.m.