View source: R/pipeline-confounds.R
summarize_confounds | R Documentation |
Calculates various confounding variables for pupil data, including blink statistics, gaze position metrics, and pupil size characteristics. These confounds are calculated separately for each preprocessing step, recording block, and epoched timeseries in the eyeris object.
summarize_confounds(eyeris)
eyeris |
An object of class |
An eyeris
object with a new nested list of data frames:
$confounds
The confounds are organized hierarchically by block and preprocessing step.
Each step contains metrics such as:
Blink rate and duration statistics
Gaze position (x,y) mean and standard deviation
Pupil size mean, standard deviation, and range
Missing data percentage
# load demo dataset
demo_data <- eyelink_asc_demo_dataset()
# calculate confounds for all blocks and preprocessing steps
confounds <- demo_data |>
eyeris::glassbox() |>
eyeris::epoch(
events = "PROBE_{type}_{trial}",
limits = c(-1, 1), # grab 1 second prior to and 1 second post event
label = "prePostProbe" # custom epoch label name
) |>
eyeris::summarize_confounds()
# access confounds for entire timeseries for a specific block and step
confounds$confounds$unepoched_timeseries
# access confounds for a specific epoched timeseries
# for a specific block and step
confounds$confounds$epoched_timeseries
confounds$confounds$epoched_epoch_wide
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.