# Evaluate an M-spline basis matrix at the specified times.

Source:`R/mspline_basis.R`

`mspline_basis.Rd`

Evaluate an M-spline basis matrix at the specified times. Extrapolation beyond the boundary knots is done by assuming that each basis term is constant beyond the boundary.

## Arguments

- times
A numeric vector of times at which to evaluate the basis.

- knots
Spline knots

- degree
Spline degree

- integrate
If

`TRUE`

, then the integrated M-spline (I-spline) basis is returned.- bsmooth
If

`TRUE`

then the function is constrained to also have zero derivative and second derivative at the boundary, which improves smoothness at the boundary (experimental feature).

## Details

The lower boundary is fixed to zero, and each basis term is assumed to be zero at times less than zero, since these models are used for hazard functions in survival data.

## References

The splines2 package is used.