evaluate.single_trial_regressor | R Documentation |
Method to evaluate a single trial regressor over a specified time grid. This computes the predicted BOLD response for the trial at each time point by convolving the trial event with its hemodynamic response function.
## S3 method for class 'single_trial_regressor'
evaluate(x, grid, precision = 0.3, ...)
x |
A single_trial_regressor object |
grid |
Numeric vector specifying the time points at which to evaluate the regressor |
precision |
Optional numeric value specifying the precision of the evaluation (default: 0.3) |
... |
Additional arguments passed to the HRF evaluation function |
A numeric vector containing the predicted BOLD response at each time point in the grid
single_trial_regressor
for creating single trial regressors,
evaluate.HRF
for HRF evaluation details
# Create and evaluate a single trial regressor
reg <- single_trial_regressor(c(10), HRF_SPMG1)
grid <- seq(0, 30, by = 0.5)
response <- evaluate(reg, grid)
# Plot the response
plot(grid, response, type = "l",
xlab = "Time (s)", ylab = "BOLD Response")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.