Files
Experiments DB Dev 8a18c894dd 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>
2026-07-22 15:45:19 -04:00

158 lines
5.7 KiB
Plaintext

==============================================================================
PHASED days x tDCS LME -- mergeNaive (Box-B2 vs Box-A2)
==============================================================================
model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day - phaseStart]
phase N A2slp B2slp day p tDCS p intP(res) intP(Satt) intP(RS) slopeDiff [95% CI]
--------------------------------------------------------------------------------------------------------
0-5 11 8.26 15.16 1.6e-10 0.852 0.000 0.000 0.013 +6.90 [+3.40,+10.41]
6-10 10 5.97 4.83 3.9e-05 0.007 0.584 0.585 0.643 -1.14 [-5.31,+3.03]
6-13 10 2.83 4.47 0.00071 0.012 0.196 0.196 0.333 +1.65 [-0.87,+4.17]
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)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 65
Fixed effects coefficients 4
Random effects coefficients 11
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
532.27 545.32 -260.14 520.27
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 9.046 4.8672 1.8586 61 0.067913
{'dayp' } 8.2602 1.0773 7.6677 61 1.6422e-10
{'tDCS' } -1.4984 7.9706 -0.188 61 0.8515
{'dayp:tDCS' } 6.9041 1.7525 3.9397 61 0.00021248
Lower Upper
-0.68649 18.779
6.106 10.414
-17.437 14.44
3.3998 10.408
Random effects covariance parameters (95% CIs):
Group: subject (11 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 9.4501
Lower Upper
5.5672 16.041
Group: Error
Name Estimate Lower Upper
{'Res Std'} 11.565 9.5751 13.968
==============================================================================
FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 50
Fixed effects coefficients 4
Random effects coefficients 10
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
404.12 415.59 -196.06 392.12
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 62.1 5.345 11.618 46 2.7953e-15
{'dayp' } 5.9667 1.3111 4.5509 46 3.8983e-05
{'tDCS' } 24 8.4512 2.8398 46 0.0067003
{'dayp:tDCS' } -1.1417 2.073 -0.55073 46 0.58449
Lower Upper
51.341 72.859
3.3276 8.6058
6.9887 41.011
-5.3144 3.0311
Random effects covariance parameters (95% CIs):
Group: subject (10 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 10.466
Lower Upper
6.207 17.646
Group: Error
Name Estimate Lower Upper
{'Res Std'} 10.156 8.1572 12.644
==============================================================================
FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 73
Fixed effects coefficients 4
Random effects coefficients 10
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
593.06 606.81 -290.53 581.06
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 66.814 4.8749 13.706 69 2.2545e-21
{'dayp' } 2.8256 0.79686 3.5459 69 0.00070793
{'tDCS' } 19.873 7.7041 2.5796 69 0.012026
{'dayp:tDCS' } 1.648 1.2621 1.3058 69 0.19595
Lower Upper
57.089 76.539
1.2359 4.4153
4.504 35.242
-0.86972 4.1658
Random effects covariance parameters (95% CIs):
Group: subject (10 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 9.246
Lower Upper
5.4692 15.631
Group: Error
Name Estimate Lower Upper
{'Res Std'} 11.498 9.661 13.686