CCAIR Behavioral LabGeorgia State University ยท J. Mack Robinson College of Business

Analysis starters

Two short scripts, one in R and one in Python, that take a study's downloads to a first mixed model. They are a starting point, not an analysis plan: decide your exclusions, outcome, and model before you look at the results, and preregister them.

What they need

From the study's admin page, Participants tab: Download trials CSV (one row per trial) and Download wide CSV (one row per participant). Then run

Rscript starter.R my-study_trials_2026-10-24.csv my-study_wide_2026-10-24.csv
python starter.py my-study_trials_2026-10-24.csv my-study_wide_2026-10-24.csv

R needs the lme4 package. Python needs pandas, statsmodels and scipy.

What they do

  1. Who is in. Test and pilot participants (test = 1) are left out. So is anyone with more data-quality flags than you allow (dq_flags in the wide CSV; one by default). Flags are reasons to look, not proof: open the participant's Replay in the admin before you exclude them. To try the scripts on pilot data, set include_test to true.
  2. TraceLab version. The scripts count trials by trace_version. Records from before October 2026 (0.1.0) counted some behavior measures differently, and those columns are blank for them.
  3. Outcome and item. The response time is rt_ms, final_rt_ms (alert triage) or the time on the trial screen; the item is item_id, alert_id or the reaction-time target.
  4. Model. Log response time by condition, with random intercepts for participant and item, and a likelihood-ratio test for condition. Effects are reported as ratios of response time. The R script also fits a logistic mixed model when there is a 0/1 outcome such as correct.

Checked

Both scripts were run on simulated data with a known 20% slower condition and recover it (a ratio near 1.2). The column definitions they rely on are in the study's codebook and in the general codebook.

Every event

For analyses of the behavior traces themselves, the admin's Raw events as CSV gives one row per event (pointer moves, clicks, keys by category, scrolling, focus, hidden tab, media, answers), with t_ms counted from the start of each trial.