regressor | R Documentation |
construct a regressor
object that can be used to generate regression variables
from a set of onset times and a hemodynamic response function. A regressor
can be
evaluated at a set of times to generate a time-course appropriate for modeling an fMRI response.
regressor(
onsets,
hrf = HRF_SPMG1,
duration = 0,
amplitude = 1,
span = 40,
summate = TRUE
)
onsets |
the event onsets in seconds |
hrf |
a hemodynamic response function, e.g. |
duration |
duration of events (default is 0) |
amplitude |
scaling vector (default is 1) |
span |
the temporal window of the impulse response function (default is 24) |
summate |
whether to summate hrf amplitude as a function of the duration of an event. |
an S3 list of type regressor
reg <- regressor(c(10,12,14,16,18, 40), HRF_SPMG1, duration=3)
pred <- evaluate(reg, seq(0,100,by=2))
nbasis(reg) == 1
reg2 <- regressor(c(10,12,14,16,18, 40), HRF_SPMG1, duration=3, summate=FALSE)
pred2 <- evaluate(reg2, seq(0,100,by=2))
stopifnot(max(pred) > max(pred2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.