bs.spline: Generate a B-spline design matrix

Description Usage Arguments Value Author(s) See Also Examples

Description

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

Usage

1
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

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

Example output

Loading required package: survival

PenCoxFrail documentation built on May 2, 2019, 6:54 a.m.