View source: R/glm_helper_functions.R
respecify_l2_models_by_subject | R Documentation |
Helper function to run the requested GLM model for each subject+session separately
respecify_l2_models_by_subject(mobj, data)
mobj |
an |
data |
The run-level data frame containing data for all ids and sessions. This will be split into individual chunks |
The function adds the $by_subject field, which contains the design matrices and contrasts
for each subject and session in data
based on the available data for that session. For example, if
a subject is missing a few runs (or these are dropped from analysis), then some contrasts may change or drop out of the model.
The $by_subject field is a keyed data.table object containing list elements for the cope_list (mapping cope numbers to contrast names), the contrasts, and the design matrix for each session.
a modified copy of mobj
where the $by_subject field has been added
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.