cSplineDes {mgcv}R Documentation

Evaluate cyclic B spline basis

Description

Uses splineDesign to set up the model matrix for a cyclic B-spline basis.

Usage

cSplineDes(x, knots, ord = 4)

Arguments

x covariate values for smooth.
knots The knot locations: the range of these must include all the data.
ord order of the basis. 4 is a cubic spline basis. Must be >1.

Details

The routine is a wrapper that sets up a B-spline basis, where the basis functions wrap at the first and last knot locations.

Value

A matrix with length(x) rows and length(knots)-1 columns.

Author(s)

Simon N. Wood simon.wood@r-project.org

See Also

cyclic.p.spline

Examples

 x <- 0:100/100;k<- 0:5/5
 X <- cSplineDes(x,k)
 plot(x,X[,1],type="l"); for (i in 2:5) lines(x,X[,i],col=i)

[Package mgcv version 1.5-5 Index]