evaluate_model | R Documentation |
A function for evaluating the model against the data.
evaluate_model(
d,
model,
tr,
roi_weights = NULL,
hrf = "spm",
t = 32,
p_boynton = c(2.25, 1.25, 2),
p_spm = c(6, 16, 1, 1, 6, 0),
f = 100,
verbose = TRUE
)
d |
A dataframe with the signal data: roi, t and y. ROI is the name of the region, t is the timestamp and y the value of the signal. |
model |
A data frame containing information about the model to use and its events (event, start_time and duration). |
tr |
MRI's repetition time. |
roi_weights |
A data frame with ROI weights: roi, weight. ROI is the name of the region, weight a number that defines the importance of that roi, the default weight for a ROI is 1. If set to 2 for a particular ROI that ROI will be twice as important. |
hrf |
Method to use for HRF generation, can be "boynton" or "spm". |
t |
The t parameter for Boynton or SPM HRF generation. |
p_boynton |
Parameters for the Boynton's HRF. |
p_spm |
Parameters for the SPM HRF. |
f |
Upsampling factor. |
verbose |
Whether to print a report of the evaluation results. |
Returns a list that contains the model, fits of events for each ROI, convolved events, TR and evaluation scores for each ROI.
# create the model
m <- data.frame(event = c("encoding", "delay", "response"),
start_time = c(0, 2.5, 12.5), duration = c(2.5, 10, 5))
# evaluate
df <- flanker
res <- evaluate_model(df, m, tr = 2.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.