get_design_bs: Construct an equidistant B-splines design matrix

Description Usage Arguments Details Value

View source: R/helper-ridge.R

Description

get_design_bs returns an equidistant B-splines design matrix without explicitly specifying the location of the knots.

Usage

1
get_design_bs(x, K, deg, EPS = 1e-06, ...)

Arguments

x

predictor vector. Required.

K

number of inner knots, or a vector of all knots (interior, boundaries, and knots outside extrema). Required.

deg

the degree of polynomial which the B-splines span. Required.

EPS

tolerance error.

...

arguments to be passed on to 'splines::splineDesign'.

Details

The knots locations are the minimum and maximum of x, and K equidistant points between these two extrema. The B-splines are equidistant, i.e. no multiple knots at both ends of x. This function uses splines::splineDesign.

Value

a list with components ‘design’ (length(x) by K + deg + 1 design matrix) and all ‘knots’ (interior and boundaries knots, and knots outside extrema).


weiyaw/flexss documentation built on June 16, 2021, 7:48 a.m.