Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Repository for “Auditory attention switching with listening difficulty: Behavioral and pupillometric measures”

For distribution, the data have been compressed, so if you want to reproduce the published analyses, the first step is to run from that script’s location.

The general analysis pipeline follows. Optional scripts are in (parentheses):

  1. parses the raw experimental output into two master CSV files
  2. behavioral-prep-for-modelling.R: more data cleaning; sets up factor contrasts; saves in .RData format
    1. (model-accuracy-exploratory.R): tries different modeling approaches with lme4::glmer
    2. (model-accuracy-selection.R): model comparison / selection
    3. model-accuracy-final.R: runs the final model through afex::mixed so we get p-values
    4. model-accuracy-posthoc.R: runs some posthoc contrasts and writes the results to CSV files
    5. (model-rt-exploratory.R): tries different modeling approaches to the reaction time data
    6. model-rt-final.R: final reaction time model
    7. model-rt-posthoc.R: runs post-hoc contrasts on reaction time data and saves to CSV files
  3. parses the raw pupillometry data
    1. extracts summary measures from pupil data (AUC, peak latency, etc.)
    2. runs the non-parametric cluster stats on the pupil data and saves results to YAML files

After that, the plotting functions can be run in any order. These generate the figures in the manuscript:


Typesetting should all be done with the makefile pubs/manuscript/Makefile:

  • make draft for a preprint, make supplement for the supplement
    • make arxivpreprint to merge the draft and supplement into a single PDF (requires pdftk)
  • make reprint for a version formatted like the final journal article (for testing page counts, figure sizes, etc.)
  • make submission for separate .tex and .pdf files, with PDF formatted for reviewer comfort (inline figures/tables, line numbers, double spacing)
  • make upload or make R1 to gather everything submittable into one folder


Data, analysis, and manuscript for pupillometry study of people with listening difficulty






No releases published


No packages published