This function generates an event set object from a given basis object of type ParametricBasis
.
It is useful for creating event sequences based on basis functions for fMRI data analyses.
Arguments
- basis
A ParametricBasis object containing the basis functions
- onsets
A numeric vector of onsets for each event in the sequence
- blockids
A numeric vector of block identifiers for each event in the sequence (default: 1)
- durations
A numeric vector of durations for each event in the sequence (default: NULL)
- subset
A logical vector indicating a subset of the basis object to use (default: TRUE for all elements)
Value
An object representing the event set based on the basis functions, with class "event_basis" and "event_seq"
Examples
# Create a ParametricBasis object
basis <- ParametricBasis("Gamma", shape = 6, rate = 0.9)
#> Error in ParametricBasis("Gamma", shape = 6, rate = 0.9): could not find function "ParametricBasis"
onsets <- seq(0, 20, length.out = 21)
blockids <- rep(1, length(onsets))
# Generate an event_basis object
ebasis <- event_basis(basis, onsets, blockids)
#> Error in inherits(basis, "ParametricBasis"): object 'basis' not found