centeredBasis.gen {DALSM}R Documentation

Generation of a recentered cubic B-spline basis matrix in additive models

Description

Generation of a cubic B-spline basis matrix with recentered columns to handle the identifiability constraint in additive models. See Wood (CRC Press 2017, pp. 175-176) for more details.

Usage

centeredBasis.gen(x, knots, cm = NULL, pen.order = 2)

Arguments

x

vector of values where to compute the "recentered" B-spline basis.

knots

vector of knots (that should cover the values in <x>).

cm

(Optional) values subtracted from each column of the original B-spline matrix.

pen.order

penalty order for the B-spline parameters (Default: 2).

Value

List containing

Author(s)

Philippe Lambert p.lambert@uliege.be

References

Lambert, P. (2021). Fast Bayesian inference using Laplace approximations in nonparametric double additive location-scale models with right- and interval-censored data. Computational Statistics and Data Analysis, 161: 107250. <doi:10.1016/j.csda.2021.107250>

Examples

x = seq(0,1,by=.01)
knots = seq(0,1,length=5)
obj = centeredBasis.gen(x,knots)
matplot(x,obj$B,type="l",ylab="Centered B-splines")
colMeans(obj$B)

[Package DALSM version 0.9.1 Index]