Learn R Programming

BayesGESM (version 1.4)

bsp: Tool to approximate smooth functions by B-splines.

Description

bsp is used to approximate smooth functions by B-splines.

Usage

bsp(x,kn)

Arguments

x
values of the explanatory variable.
kn
(optional) the number of internal knots . The default value is $[n^{1/5}]$, where n is the sample size

Value

x
the B-spline basis matrix, which is cubic.

Details

This function uses the routine bs() of the R package splines.

References

De Boor, C. (1978). A practical Guide to Splines. Applied Mathematical Sciences. Springer-Verlag, New York.