bs.spline: Generate a B-spline design matrix

bs.designR Documentation

Generate a B-spline design matrix

Description

The function generates a B-spline design matrix with equidistant knots for given degree of the splines and number of basis functions.

Usage

bs.design(x, xl, xr, spline.degree, nbasis, comp = NULL)

Arguments

x

the positions where spline to be evaluated.

xl

lower intervall boundary where spline functions are relevant.

xr

upper intervall boundary where spline functions are relevant.

spline.degree

(polynomial) degree of the B-splines.

nbasis

number of basis functions used.

comp

Specify if only specific columns of the B-spline design matrix should be returned. Default is NULL and the whole B-spline design matrix is returned.

Value

The B-spline design matrix is returned.

Author(s)

Andreas Groll groll@math.lmu.de

See Also

pencoxfrail

Examples

x <- rnorm(100)
B <- bs.design(x=x, xl=min(x), xr=max(x), spline.degree=3, nbasis=5)

PenCoxFrail documentation built on Sept. 11, 2024, 7:12 p.m.