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 uncompress-data.sh from that
script’s location.
The general analysis pipeline follows. Optional scripts are in (parentheses):
behavioral-data-cleaning.py: parses the raw experimental output into two master CSV filesbehavioral-prep-for-modelling.R: more data cleaning; sets up factor contrasts; saves in.RDataformat- (
model-accuracy-exploratory.R): tries different modeling approaches withlme4::glmer - (
model-accuracy-selection.R): model comparison / selection model-accuracy-final.R: runs the final model throughafex::mixedso we get p-valuesmodel-accuracy-posthoc.R: runs some posthoc contrasts and writes the results to CSV files- (
model-rt-exploratory.R): tries different modeling approaches to the reaction time data model-rt-final.R: final reaction time modelmodel-rt-posthoc.R: runs post-hoc contrasts on reaction time data and saves to CSV files
- (
pupil-data-cleaning.py: parses the raw pupillometry datapupil-metrics.py: extracts summary measures from pupil data (AUC, peak latency, etc.)pupil-stats.py: 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:
plot-trial-diagram.pyplot-accuracy.pyplot-rt.pyplot-pupil-attn-by-space-group.pyplot-pupil-group-by-space-attn.pyposthocs.py
Typesetting should all be done with the makefile pubs/manuscript/Makefile:
make draftfor a preprint,make supplementfor the supplementmake arxivpreprintto merge the draft and supplement into a single PDF (requirespdftk)
make reprintfor a version formatted like the final journal article (for testing page counts, figure sizes, etc.)make submissionfor separate.texand.pdffiles, with PDF formatted for reviewer comfort (inline figures/tables, line numbers, double spacing)make uploadormake R1to gather everything submittable into one folder