feat(matlab): add Satterthwaite DF + honest random-slope test to LME reports

Every fitlme-based report (lme_*, paper_*, phase_*, and the variations'
analyze.m) now shows, per effect: residual-DF p, Satterthwaite-DF p, and --
for the interaction -- an HONEST test from a per-animal random-SLOPE model
(day|rat), whose Satterthwaite DF collapses toward the animal count.

New: tdcs_random_slope_interaction.m (shared helper). Wired into tdcs_lme,
tdcs_paper_lme, tdcs_phase_lme, variation_analyze; SUMMARY.csv gains
interaction_p_satt / interaction_p_rs. Regenerated all results/, variations/,
matched-effort outputs.

Key point this surfaces: Satterthwaite ~= residual on the random-INTERCEPT
model (the slope's error is at session level), so it does NOT fix
pseudoreplication; the random-slope model does. Effect: full-range mergeA2
interaction 0.009 -> 0.75 (collapses); unmerge_d0_5 0.015 -> 0.13 (n.s.);
the pooled-control early windows survive honestly (naive_a2_d0_5 0.001 ->
0.028; naive_boxa_d0_5 0.003 -> 0.036). Suite 42/42.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-22 15:45:19 -04:00
parent 5fcd97f81a
commit 8a18c894dd
77 changed files with 2066 additions and 345 deletions
+10 -8
View File
@@ -3,15 +3,17 @@ PHASED days x tDCS LME -- mergeA2 (Box-B2 vs Box-A2)
==============================================================================
model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
phase N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95% CI]
--------------------------------------------------------------------------------------------
0-5 8 10.54 15.16 1.5e-10 0.693 0.014 +4.62 [+1.00, +8.24]
6-10 7 3.17 4.83 0.035 0.127 0.390 +1.66 [-2.22, +5.53]
6-13 7 2.92 4.47 0.00032 0.125 0.118 +1.55 [-0.41, +3.52]
phase N A2slp B2slp day p tDCS p intP(res) intP(Satt) intP(RS) slopeDiff [95% CI]
--------------------------------------------------------------------------------------------------------
0-5 8 10.54 15.16 1.5e-10 0.693 0.014 0.014 0.089 +4.62 [+1.00,+8.24]
6-10 7 3.17 4.83 0.035 0.127 0.390 0.390 0.466 +1.66 [-2.22,+5.53]
6-13 7 2.92 4.47 0.00032 0.125 0.118 0.118 0.303 +1.55 [-0.41,+3.52]
Note: the interaction p (and CI) use fitlme observation-level DF and are
ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early
phase carries the Box-B2 faster-acquisition signal; late phases converge.
Columns: intP(res)=observation-level DF (anticonservative); intP(Satt)=Satterthwaite
DF (~= residual on this random-intercept model); intP(RS)=per-animal random-slope
(dayp|subject) model, the honest test (DF collapses toward the animal count; 'n/a' if it
did not converge). The early phase carries the Box-B2 faster-acquisition signal; late
phases converge.
==============================================================================
FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
==============================================================================