make_HRFs {BayesfMRI} | R Documentation |
Make HRFs
Description
Create HRF design matrix columns from onsets and durations
Usage
make_HRFs(
onsets,
TR,
duration,
dHRF = c(0, 1, 2),
dHRF_as = c("auto", "nuisance", "task"),
downsample = 100,
verbose = FALSE
)
Arguments
onsets |
|
TR |
Temporal resolution of the data, in seconds. |
duration |
The number of volumes in the fMRI data. |
dHRF |
Set to |
dHRF_as |
Only applies if |
downsample |
Downsample factor for convolving stimulus boxcar or stick
function with canonical HRF. Default: |
verbose |
If applicable, print a message saying how the HRF derivatives
will be modeled? Default: |
Value
List with the design matrix and/or the nuisance matrix containing the
HRF-convolved stimuli as columns, depending on dHRF_as
.
Examples
onsets <- list(taskA=cbind(c(2,17,23),4)) # one task, 3 four sec-long stimuli
TR <- .72 # .72 seconds per volume, or (1/.72) Hz
duration <- 300 # session is 300 volumes long (300*.72 seconds long)
make_HRFs(onsets, TR, duration)