Skip to content

Transition-dynamics revision analyses (switch-repeat & intervals-since-switch; drift/threshold + Euclidean distance) — summary + final analyses #2

Description

@igrahek

Purpose

Briefing + task list for a follow-up agent that will run final transition-dynamics analyses. Nothing here is decided for the paper — the goal is to produce clean, reportable results and figures so @igrahek can decide what (if anything) goes into the revision.

These analyses probe the reviewer concern (R1/R3, JEP:G) that the varying-block undershoot might be a static "in-between" strategic setpoint rather than a genuine slow transition through drift–threshold space, and whether the paper's block-level age effect (slower transitions with age) holds at finer (trial/interval) timescales.

Convention: these are Bayesian models; "p" = posterior tail probability (proportion of the posterior on the far side of 0), matching the lab's DDM_analyses_and_plots.Rmd. * p<.05, ** p<.01. Coding: intervalType Accuracy=+.5/Speed=−.5; Switch Repeat=+.5/Switch=−.5; SinceSwitch 0=switch…4="4+"; Age linear, scaled ×100; congruency cong=+.5.

Models involved

Model Spec (v & a) Data Output
Switch/repeat (binary) intervalType * Switch * Age varying blocks analyses/hssm/output/Model3 (this repo)
Model 4 (intervals-since-switch) intervalType * SinceSwitch * Age varying blocks Oscar ~/data/igrahek/aging_switch-repeat/analyses/hssm/output/Model4
Block-level (for reference) intervalType * blockType * Age (Fixed vs Varying) all blocks Model1 (this repo) / Fig. 2F metric

Model 4 is a strict generalization of the switch/repeat model (SinceSwitch==0Switch=="Switch"). Analysis scripts + figures are in analyses/hssm/analysis/recovery_analysis/ (see its README).


What we found

1. Switch/repeat (binary) — drift & threshold

  • Switch cost is weak: v_Switch = +0.021, p=.083 (drift a touch lower on switch trials); a_Switch ≈ 0.
  • The undershoot signature exists on threshold: a_intervalType:Switch = +0.021, p=.011 ✱; on drift v_intervalType:Switch = +0.024, p=.20 (n.s.).
  • Age × switch is null: 3-way v_intervalType:Switch:Age = −0.16, p=.12; a_intervalType:Switch:Age = −0.04, p=.15. Switch-effect-at-young-vs-old is flat overall (drift young +0.023 → old +0.019).

2. Switch/repeat — Euclidean distance (in v,a space)

  • Trial-level undershoot is present (Repeat–Switch Speed↔Accuracy distance ~0.67 vs 0.65) but tiny (~3% vs ~21% at block level).
  • It decreases with age (opposite of block level): slope −0.0014/yr, P(slope<0)=0.90 — a trend, not credible.
  • No coding error (settled R3's concern): reconstructing the block-level distance from Model1 confirms undershoot increases with age robustly — slope +0.0055/yr, P(>0)=1.00 (dist Fixed 1.48 > Varying 1.16). The block-level 3-way sign is correct.

3. Intervals-since-switch (Model 4) — drift & threshold

  • The recovery mechanism is credible: v_SinceSwitch = +0.021, p=.002 ✱✱ (drift rebuilds across intervals since the switch); a_intervalType:SinceSwitch = +0.011, p=.011 ✱ (goal-specific boundary undershoot recovers).
  • Age × recovery is null: 3-way v_intervalType:SinceSwitch:Age = −0.058, p=.199; a_intervalType:SinceSwitch:Age = −0.018, p=.205.
  • Recovery slope (Speed↔Accuracy gap growth per interval) young vs old — correctly signed (slower in old) but not credible: drift young +0.029 (P>0=.86) → old −0.006, P(slower in old)=.80; boundary young +0.017 (P>0=.98) → old +0.006, P(slower)=.80.
  • Replicates the core aging effect: a_Age = +0.199, p=.003 ✱✱ (older = more cautious).
  • Convergence: population fixed effects max R̂=1.02, key SinceSwitch terms R̂=1.00, ESS 1300–2100. Whole model (incl. 245× random effects) max R̂=1.21, min ESS=17, 3.6% of params R̂>1.01 → a few subject-level effects mixed poorly (typical; does not affect population inference).

4. Intervals-since-switch — Euclidean distance (in v,a space)

Speed↔Accuracy distance vs SinceSwitch (SD-scaled, fully Bayesian):

SinceSwitch 0 1 2 3 4
Young (25) 5.80 6.16 6.52 6.89 7.25 (rising)
Old (75) 4.62 4.67 4.73 4.80 4.87 (flat)
  • Genuine transition, not a setpoint: whole-sample recovery (dist SS=4 − SS=0) = +0.78, P(>0)=0.96; young recovery = +1.45, P(>0)=0.965. The distance rises across intervals → configs are moving toward targets, not parked at a compressed setpoint.
  • Old is nearly flat (recovery +0.26, P=0.65). Old−young recovery = −1.19, P(slower with age)=0.835 — combining v+a nudged this above the separate-parameter ~.80, but still not credible.

Interpretation so far (for discussion, not decided)

  • Transition vs. setpoint → transition. The (v,a) distance credibly grows across intervals (P=.96 sample-wide, P=.965 in young), which a static in-between strategy can't produce. Older adults being ~flat is, on its own, ambiguous (setpoint vs. a transition too slow to resolve within the short observed run lengths), but the paper's preserved configural flexibility in fixed blocks (older reach full Speed↔Accuracy separation when the goal is stable) breaks the tie toward "adjusting, but slower," not "strategic compression."
  • Age-related slowing is correctly signed everywhere but only credible at the block level. Every trial/interval-level measure (switch/repeat and intervals-since-switch; drift, threshold, and combined distance) points to slower recovery with age, at P ≈ .80–.84 — a coherent trend, not a confirmed effect. The credible evidence for age-related slowing remains the block-level Fixed vs Varying contrast (the paper's main result).

Final analyses to run (agent tasks)

  1. Recovery-curve figure (priority). Model-4 analog of Fig. 2F: Speed↔Accuracy distance in (v,a) space vs intervals-since-switch, young vs old, with 95% credible bands, and the fixed-block asymptote marked (pull it from the block-level model). This single panel carries the transition-vs-setpoint story. Base it on model4_distance_vs_sinceswitch.py.
  2. Model comparison (LOO/WAIC). Does the graded SinceSwitch improve fit over (a) binary Switch and (b) a no-transition base? Justifies reporting the recovery model at all. (log-likelihood is stored in the InferenceData.)
  3. Categorical SinceSwitch robustness. Refit with C(SinceSwitch) to cleanly separate the switch-cost (0 vs rest) from the graded recovery (1→2→3→4), and confirm the linear-slope reading. The 0-vs-rest contrast should reproduce the binary switch effect.
  4. Quadratic age. The paper found quadratic age enhances the block-level effect — test intervalType * SinceSwitch * Age_2 to see whether the interval-level slowing concentrates in the oldest-old (may push P above the credibility line).
  5. Reporting tables for SI. Full estimate / 95% CrI / tail-p / R̂ / ESS tables for the switch-repeat and intervals-since-switch models (drift, threshold) and the distance-recovery contrasts, formatted like Tables S1/S2.
  6. Convergence follow-up. Identify which subject-level parameters had R̂>1.1 / low ESS; decide whether a longer warmup or non-centered reparam is warranted for a clean SI statement (population inference already fine).

Provenance / caveats

  • SinceSwitch attached via analyses/hssm/data/add_sinceswitch.R (binary boundary exact; 0.14% of trials / 119 rows carry graded ambiguity from indistinguishable trials). A full modern-tidyverse re-run of Preprocessing.R drifts ~6% of Switch labels (not reproducible), so canonical data was preserved. For a fully exact regeneration, run Preprocessing.R under the original tidyverse.
  • Model 4 fit: Oscar, account carney-frankmj-condo2, partition batch, env pyHSSM_New_Nov24, ~45 h, Model4.sh.
  • Model 4 output (2.79 GB) lives only on Oscar (aging_switch-repeat/analyses/hssm/output/Model4); analyze there (scripts open only the posterior group with engine="h5netcdf").

cc @igrahek — final call on what enters the revision is yours.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions