getSplineBasis {limorhyde} | R Documentation |
Basis matrix for periodic splines
Description
Generate basis matrix for a periodic B-spline using pbs::pbs()
.
Usage
getSplineBasis(x, period, nKnots, intercept)
Arguments
x |
Values of the predictor variable. |
period |
Period for the predictor variable. |
nKnots |
Number of internal knots. |
intercept |
If |
Value
A matrix with a row for each value of x
and a column for each
component of the decomposition.
Examples
b = getSplineBasis(seq(0, 20, 4), period = 24, nKnots = 3, intercept = FALSE)
[Package limorhyde version 1.0.1 Index]