Make tdcs_paper_lme window-aware (windowKey 'full'|'d0_10'|'d0_13',
default 'full' -> unchanged filename). Windowed runs give the two anchor
arms equal day coverage, so the stim:day interaction is not confounded by
the full-range coverage imbalance; the report now states whether coverage
is equal and adds an INTERPRETATION block. Add switch cases
paper_mergeNaive_d0_10 / _d0_13 and include them in run_all.
Finding: unlike mergeA2 (fair-window interaction n.s.), the pooled-naive
control keeps the interaction significant in the fair d0_13 window
(F(1)=7.07, p=0.0088, +1.80 [+0.46,+3.14]; equal on Day 1 p=0.20),
reproducing the paper without the coverage confound; d0_10 is borderline
(p=0.051).
Tests: tLme asserts equal coverage / no warning / one full summary for
both windows and a significant positive d0_13 interaction; bad windowKey
errors. Suite 41/41.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds cfg.mergeNaive and scenario/paper/phase/power support. This pooled grouping
is the closest replication of the paper's full pattern: paper LME interaction
F(1)=7.30, p=0.008 (paper 7.12/0.008), stim main n.s. (p=0.21 = equal on Day 1),
strong day effect; the overall tDCS advantage is significant at the cluster-honest
per-animal level (rate p=0.003) and well powered. Adds a grouping test. Suite 38/38.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds tdcs_paper_lme replicating the paper's exact formula/variable names (paper_*
switch cases): mergeA2 reproduces the interaction F(1)=7.09 vs 7.12, p=0.009 vs
0.008, with a coverage-confound warning. Rewrites tdcs_power_sim to fit that same
formula (interaction term canonicalized to day:stim). Adds a replication test.
Suite 37/37.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds tdcs_phase_lme (same LME refit within learning phases 0-5/6-10/6-13, with
per-phase slopes + interaction 95% CI) as phase_* switch cases, and
tdcs_power_sim (Monte-Carlo power for the early-phase interaction, scored by the
cluster-honest per-animal test and the LME test) + run_power. Findings: the
Box-B2 faster-acquisition signal is in the early phase; at n=3-5/group honest
power is 0.3-0.7 even at the observed effect (need ~8/group if effect is as
observed, ~20/group if half). Adds tPhasePower tests. Suite 35/35.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Box-A2 has no data past ~day 13, so the full-range days x tDCS interaction
extrapolates A2's slope and is confounded (spuriously significant, wrong sign).
Add the _d0_13 window (equal anchor coverage) and a report warning when the two
groups' day coverage is unequal. In the fair 0-13 window the interaction is n.s.
with a POSITIVE slope diff and the Day-1 tDCS effect is n.s. -- matching the
paper's 'equal on Day 1' direction (underpowered at n=8). Suite 32/32.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds 6 switch cases replicating the paper's linear mixed model
success ~ day * tDCS + (1|subject) on the Box-B2(tDCS=1) vs Box-A2(tDCS=0)
arm, reporting the days x tDCS interaction, days, and tDCS effects as t/F/p.
mergeA2_full reproduces the paper's interaction (F=7.09 vs 7.12, p=0.009 vs
0.008); interpretation is sign-aware and honestly notes our data diverges from
the paper (Box-B2 ahead on day 1, gap narrows -- not 'equal on day 1,
accumulates'). Adds tLme tests. Suite 31/31.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>