The `hrf_bspline` function computes a B-spline basis for an HRF at time
points `t`. The `N` basis functions are the interior functions of a clamped
B-spline basis on [0, span] with evenly spaced knots: the functions
anchored at the two boundaries are dropped, so every basis function (and
therefore every fitted HRF) is zero at onset and at the end of the span.
Outside [0, span] the basis is zero.
Arguments
- t
A vector of time points.
- span
A numeric value representing the temporal window over which the basis set spans. Default value is 24.
- N
An integer representing the number of basis functions. Must be at least
degree - 1. Default value is 5.- degree
An integer representing the degree of the spline. Default value is 3.
- ...
Further arguments passed to
bs(intercept,dfandknotsare set internally and ignored if supplied).
See also
Other hrf_functions:
hrf_basis_lwu(),
hrf_boxcar(),
hrf_gamma(),
hrf_gaussian(),
hrf_inv_logit(),
hrf_lwu(),
hrf_mexhat(),
hrf_sine(),
hrf_spmg1(),
hrf_time(),
hrf_weighted()
Examples
# Compute the B-spline HRF representation for time points from 0 to 20 with 0.5 increments
hrfb <- hrf_bspline(seq(0, 20, by = .5), N = 4, degree = 2)