View source: R/get_l1_confounds.R
get_l1_confounds | R Documentation |
helper function to generate confounds txt file for inclusion as additional regressors
get_l1_confounds(
run_df = NULL,
id = NULL,
session = NULL,
run_number = NULL,
gpa,
demean = TRUE
)
run_df |
a single-row data.frame containing information about the run whose confounds should be calculated |
id |
The subject id |
session |
The session number |
run_number |
The run number |
gpa |
a |
demean |
whether to demean confounds after calculation |
This function checks for whether an l1 confounds file already exists in the expected location. If it does not, the l1 confounds file will be generated according to the $confound_settings$l1_confound_regressors variable. If that is NULL, no confounds will be created.
Confounds are generated by looking for motion parameters based on $confound_settings$motion_params_file and $confound_settings$confound_input_file. These are integrated, then columns that are requested in $confound_settings$l1_confound_regressors are written to a text file in the analysis subfolder for each subject
Likewise, any run-level exclusions are tested according to $confound_settings$exclude_run. This should be a quoted expression that can tested against the confounds data.frame such that a single TRUE/FALSE is returned indicating whether a run is excluded (TRUE) or retained (FALSE) for higher-level analyses.
a list containing: confounds=<location of l1 confounds file>, exclude_run=<TRUE/FALSE denoting run exclusion, exclude_data=<location of file containing columns used to calculate run exclusion>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.