Return a Spline Regression Design Matrix

USAGE:

spline.des(knots, x, ord, derivs) 

ARGUMENTS:

knots
vector of knots for the spline
x
x-coordinates at which to evaluate the spline basis functions
ord
order of the spline. The order is the number of coefficients in each polynomial segment so a cubic spline has order 4 (the default).
derivs
order of derivative to evaluate at each of the points. If this vector is given it must have the same length as x. The default is a vector of zeros the same length as x.

VALUE:

a structure with components
knots
knot vector
order
order of the spline
derivs
vector of derivatives.
design
design matrix for the b-splines determined by the knot vector at the given x-values. If derivs has non-zero components, the indicated derivatives are evaluated instead.

DETAILS:

This is support for the functions bs and ns.

SEE ALSO:

, .