feat(matlab): print full native fitlme/fitglme summary in every scenario

Add tdcs_model_summary as the single place that renders a fitted model
verbatim (disp(model) with the Command-Window <strong> markup stripped),
and route every report through it so all scenarios emit the complete
model-fitting output:

- tdcs_report: adds the learning-rate GLMM's full summary (count/rate
  already had theirs); localCleanDisp now delegates to the shared helper.
- tdcs_lme_report / tdcs_paper_lme: embed the full fitlme summary before
  the curated effect table.
- tdcs_phase_lme: appends each phase's full fitlme summary.

Tests: tReport asserts 3 native summaries in a GLMM report; tLme asserts
the lme_*/paper_*/phase_* reports embed 1/1/3 summaries with markup
stripped. Suite 39/39.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-20 14:21:34 -04:00
parent d59ff2b659
commit 0e9263b958
41 changed files with 4637 additions and 7 deletions
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_d0_10
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 83 sessions
day coverage: Box-B2 0..10, Box-A2 0..10
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 83
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
673.84 688.35 -330.92 661.84
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 15.599 3.7298 4.1822 79 7.4136e-05
{'day' } 8.3258 0.66962 12.434 79 2.7592e-20
{'tDCS' } 4.1737 5.2381 0.79679 79 0.42796
{'day:tDCS' } 1.3833 0.9137 1.514 79 0.13402
Lower Upper
8.175 23.023
6.9929 9.6586
-6.2525 14.6
-0.43535 3.202
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 13.04 11.2 15.183
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(79)= 1.51 F(1)= 2.292 p=0.134
days (learning) t(79)= 12.43 F(1)= 154.593 p=2.759e-20
tDCS (main, at Day 1) t(79)= 0.80 F(1)= 0.635 p=0.428
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.1340, slope diff=1.38) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=2.8e-20) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.4280) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_d0_13
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 98 sessions
day coverage: Box-B2 0..13, Box-A2 0..13
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 98
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
809.08 824.59 -398.54 797.08
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 19.458 3.7166 5.2352 94 1.0011e-06
{'day' } 7.1842 0.54693 13.135 94 5.4028e-23
{'tDCS' } 5.841 5.1946 1.1244 94 0.26369
{'day:tDCS' } 1.0024 0.73807 1.3581 94 0.17769
Lower Upper
12.078 26.837
6.0982 8.2701
-4.473 16.155
-0.4631 2.4678
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 14.123 12.278 16.245
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(94)= 1.36 F(1)= 1.844 p=0.1777
days (learning) t(94)= 13.14 F(1)= 172.537 p=5.403e-23
tDCS (main, at Day 1) t(94)= 1.12 F(1)= 1.264 p=0.2637
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.1777, slope diff=1.00) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=5.4e-23) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.2637) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,73 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeA2_full
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 109 sessions
day coverage: Box-B2 0..22, Box-A2 0..14
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
** WARNING: the groups' day coverage is UNEQUAL (differ by 8 days). The
interaction/slope over this window EXTRAPOLATES the shorter group's line and is
CONFOUNDED -- prefer the _d0_14 window (both groups have data throughout). **
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 109
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
962.68 978.83 -475.34 950.68
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 20.701 4.9127 4.2138 105 5.3256e-05
{'day' } 6.8599 0.69872 9.8178 105 1.5726e-16
{'tDCS' } 22.092 6.4372 3.4319 105 0.00085848
{'day:tDCS' } -2.1793 0.81821 -2.6635 105 0.0089525
Lower Upper
10.96 30.442
5.4745 8.2453
9.3279 34.855
-3.8016 -0.55692
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 2.1043e-15
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 18.954 16.597 21.644
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(105)= -2.66 F(1)= 7.094 p=0.008953
days (learning) t(105)= 9.82 F(1)= 96.388 p=1.573e-16
tDCS (main, at Day 1) t(105)= 3.43 F(1)= 11.778 p=0.0008585
INTERPRETATION
- days x tDCS interaction: SIGNIFICANT (p=0.0090, slope diff=-2.18) -> the tDCS (Box-B2) group improves SLOWER -- groups CONVERGE (Box-B2 is ahead early, the gap narrows).
- days (learning): SIGNIFICANT (p=1.6e-16) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): SIGNIFICANT (p=0.0009) -> the groups already DIFFER on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_d0_10
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 83 sessions
day coverage: Box-B2 0..10, Box-A2 0..10
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 83
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
669.06 683.57 -328.53 657.06
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 17.318 5.1725 3.348 79 0.0012488
{'day' } 7.9975 0.75795 10.551 79 9.547e-17
{'tDCS' } 0.42782 6.5088 0.06573 79 0.94776
{'day:tDCS' } 1.7407 0.91342 1.9057 79 0.060324
Lower Upper
7.0221 27.613
6.4888 9.5061
-12.528 13.383
-0.07739 3.5588
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.7075
Lower Upper
2.7829 11.705
Group: Error
Name Estimate Lower Upper
{'Res Std'} 11.955 10.184 14.034
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(79)= 1.91 F(1)= 3.632 p=0.06032
days (learning) t(79)= 10.55 F(1)= 111.334 p=9.547e-17
tDCS (main, at Day 1) t(79)= 0.07 F(1)= 0.004 p=0.9478
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.0603, slope diff=1.74) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=9.5e-17) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.9478) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_d0_13
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 98 sessions
day coverage: Box-B2 0..13, Box-A2 0..13
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 98
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
803.97 819.48 -395.99 791.97
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.528 5.1581 4.1736 94 6.6907e-05
{'day' } 6.6603 0.67208 9.91 94 2.855e-16
{'tDCS' } 1.8428 6.4496 0.28572 94 0.77572
{'day:tDCS' } 1.5375 0.78742 1.9525 94 0.053848
Lower Upper
11.286 31.769
5.3259 7.9948
-10.963 14.649
-0.025966 3.1009
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.4251
Lower Upper
2.6045 11.3
Group: Error
Name Estimate Lower Upper
{'Res Std'} 13.148 11.362 15.215
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(94)= 1.95 F(1)= 3.812 p=0.05385
days (learning) t(94)= 9.91 F(1)= 98.208 p=2.855e-16
tDCS (main, at Day 1) t(94)= 0.29 F(1)= 0.082 p=0.7757
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.0538, slope diff=1.54) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=2.9e-16) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.7757) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,73 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_mergeB2_full
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 8 subjects, 109 sessions
day coverage: Box-B2 0..22, Box-A2 0..13
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
** WARNING: the groups' day coverage is UNEQUAL (differ by 9 days). The
interaction/slope over this window EXTRAPOLATES the shorter group's line and is
CONFOUNDED -- prefer the _d0_13 window (both groups have data throughout). **
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 109
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
967.24 983.39 -477.62 955.24
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.7 5.9981 3.6178 105 0.00045861
{'day' } 6.4863 0.9412 6.8916 105 4.2336e-10
{'tDCS' } 17.493 7.1288 2.4538 105 0.015779
{'day:tDCS' } -1.4651 1.025 -1.4294 105 0.15586
Lower Upper
9.8069 33.593
4.6201 8.3526
3.3578 31.628
-3.4974 0.56726
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 2.1487e-15
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 19.354 16.948 22.101
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(105)= -1.43 F(1)= 2.043 p=0.1559
days (learning) t(105)= 6.89 F(1)= 47.494 p=4.234e-10
tDCS (main, at Day 1) t(105)= 2.45 F(1)= 6.021 p=0.01578
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.1559, slope diff=-1.47) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=4.2e-10) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): SIGNIFICANT (p=0.0158) -> the groups already DIFFER on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_d0_10
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 6 subjects, 61 sessions
day coverage: Box-B2 0..10, Box-A2 0..10
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 61
Fixed effects coefficients 4
Random effects coefficients 6
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
499.59 512.25 -243.79 487.59
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 17.372 5.1906 3.3469 57 0.0014518
{'day' } 7.9666 0.79053 10.077 57 2.8317e-14
{'tDCS' } 4.9763 7.2862 0.68298 57 0.49739
{'day:tDCS' } 1.5577 1.0483 1.4858 57 0.14283
Lower Upper
6.9783 27.766
6.3836 9.5496
-9.614 19.567
-0.5416 3.6569
Random effects covariance parameters (95% CIs):
Group: subject (6 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.3536
Lower Upper
2.1542 13.305
Group: Error
Name Estimate Lower Upper
{'Res Std'} 12.508 10.37 15.086
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(57)= 1.49 F(1)= 2.208 p=0.1428
days (learning) t(57)= 10.08 F(1)= 101.556 p=2.832e-14
tDCS (main, at Day 1) t(57)= 0.68 F(1)= 0.466 p=0.4974
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.1428, slope diff=1.56) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=2.8e-14) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.4974) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_d0_13
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 6 subjects, 70 sessions
day coverage: Box-B2 0..13, Box-A2 0..13
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 70
Fixed effects coefficients 4
Random effects coefficients 6
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
586.72 600.22 -287.36 574.72
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.7 4.5484 4.7709 66 1.0537e-05
{'day' } 6.4863 0.71372 9.0881 66 3.0346e-13
{'tDCS' } 6.0226 6.3135 0.95392 66 0.3436
{'day:tDCS' } 1.5467 0.93755 1.6497 66 0.10376
Lower Upper
12.619 30.781
5.0614 7.9113
-6.5827 18.628
-0.32523 3.4185
Random effects covariance parameters (95% CIs):
Group: subject (6 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 14.676 12.436 17.32
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(66)= 1.65 F(1)= 2.721 p=0.1038
days (learning) t(66)= 9.09 F(1)= 82.593 p=3.035e-13
tDCS (main, at Day 1) t(66)= 0.95 F(1)= 0.910 p=0.3436
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.1038, slope diff=1.55) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=3e-13) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.3436) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
@@ -0,0 +1,70 @@
==============================================================================
LINEAR MIXED MODEL (days x tDCS) -- scenario: lme_unmerged_full
==============================================================================
model: success ~ day * tDCS + (1|subject) [tDCS: Electrode-Box-B2 = 1 vs Electrode-Box-A2 = 0]
N = 6 subjects, 71 sessions
day coverage: Box-B2 0..14, Box-A2 0..13
(day is raw and 0-indexed: our day 0 = the paper's "Day 1", so the tDCS
main effect below is the group difference on Day 1 -- comparable to the paper.)
==============================================================================
FULL MODEL SUMMARY -- fitlme: success ~ day*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 71
Fixed effects coefficients 4
Random effects coefficients 6
Covariance parameters 2
Formula:
success ~ 1 + day*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
596.33 609.9 -292.16 584.33
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.53 5.5382 3.8874 67 0.00023506
{'day' } 6.6587 0.72367 9.2014 67 1.6706e-13
{'tDCS' } 8.0204 7.6977 1.0419 67 0.3012
{'day:tDCS' } 0.93747 0.9187 1.0204 67 0.3112
Lower Upper
10.475 32.584
5.2143 8.1032
-7.3444 23.385
-0.89627 2.7712
Random effects covariance parameters (95% CIs):
Group: subject (6 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.7931
Lower Upper
2.4723 13.574
Group: Error
Name Estimate Lower Upper
{'Res Std'} 14.163 11.93 16.813
effect t (df) F (df1) p
----------------------------------------------------------------------
days x tDCS (interaction) t(67)= 1.02 F(1)= 1.041 p=0.3112
days (learning) t(67)= 9.20 F(1)= 84.665 p=1.671e-13
tDCS (main, at Day 1) t(67)= 1.04 F(1)= 1.086 p=0.3012
INTERPRETATION
- days x tDCS interaction: n.s. (p=0.3112, slope diff=0.94) -> slopes are parallel (no differential change over training).
- days (learning): SIGNIFICANT (p=1.7e-13) -> performance improves with training.
- tDCS main effect on Day 1 (our day 0): n.s. (p=0.3012) -> the groups are comparable (as in the paper) on Day 1.
Paper reference (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008;
days t(227)=9.64, F(1)=267.64, p=1.2e-18; tDCS t(227)=0.23, F(1)=0.053, p=0.81.
(Our N and exact statistics differ; this replicates the MODEL FORM on our data.)
+199
View File
@@ -0,0 +1,199 @@
==============================================================================
tDCS GLM report -- scenario: mergeA2_d0_10
==============================================================================
merge key: mergeA2 day window: 0..10 observations: 126
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 4 44 68.3 0.541 10
Electrode-Box-A2 4 39 54.0 0.452 10
Naive 4 43 46.8 0.440 10
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
297.29 314.31 -142.65 285.29
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.2656 0.092258 46.236 121
{'group_Electrode-Box-A2'} -0.12664 0.12996 -0.97447 121
{'group_Naive' } -0.41983 0.12988 -3.2324 121
{'day_c' } 0.20187 0.0052718 38.293 121
{'day_c2' } -0.024068 0.0015714 -15.317 121
pValue Lower Upper
9.3543e-79 4.083 4.4483
0.33177 -0.38392 0.13065
0.0015818 -0.67696 -0.1627
1.7547e-69 0.19144 0.21231
4.2028e-30 -0.027179 -0.020957
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.17893
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 124
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
363.74 380.67 -175.87 351.74
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.15282 0.1244 1.2285 119
{'group_Electrode-Box-A2'} -0.28467 0.17474 -1.6291 119
{'group_Naive' } -0.57945 0.17473 -3.3162 119
{'day_c' } 0.21677 0.0069268 31.294 119
{'day_c2' } -0.013732 0.0021989 -6.2451 119
pValue Lower Upper
0.22169 -0.0935 0.39915
0.10595 -0.63068 0.061343
0.0012101 -0.92543 -0.23346
2.8838e-59 0.20305 0.23048
6.7844e-09 -0.018086 -0.0093781
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.23963
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
304.66 327.35 -144.33 288.66
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.2968 0.091824 46.794
{'group_Electrode-Box-A2' } -0.15174 0.12947 -1.172
{'group_Naive' } -0.50686 0.13029 -3.8902
{'day_c' } 0.18436 0.0072535 25.417
{'day_c2' } -0.024459 0.001577 -15.509
{'group_Electrode-Box-A2:day_c'} 0.014228 0.010876 1.3082
{'group_Naive:day_c' } 0.051203 0.011091 4.6167
DF pValue Lower Upper
119 1.7772e-78 4.115 4.4786
119 0.24354 -0.4081 0.10462
119 0.00016554 -0.76486 -0.24887
119 6.5517e-50 0.17 0.19872
119 2.3835e-30 -0.027581 -0.021336
119 0.19332 -0.0073071 0.035763
119 9.9271e-06 0.029242 0.073164
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.17742
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=9.71, Box-A2 mean=9.18
Welch two-sided p=0.556, Mann-Whitney p=0.686 (nB=4, nA=4) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0001, but with just
observation-level DF (df2=119) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.14x Box-A2 (one-sided p=0.1649) -> not supported
[rate/level ] Box-B2 = 1.33x Box-A2 (one-sided p=0.0517) -> not supported
Per-animal (Box-B2 n=4 vs Box-A2 n=4), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0230, Mann-Whitney one-sided (B2>A2) p=0.0143
rate (per-subject pooled success/total): Welch two-sided p=0.0689, Mann-Whitney one-sided (B2>A2) p=0.0571
(No unknown groups -- they were merged into the anchors; only the H2 anchor
contrast applies.)
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+199
View File
@@ -0,0 +1,199 @@
==============================================================================
tDCS GLM report -- scenario: mergeA2_full
==============================================================================
merge key: mergeA2 day window: 0..26 observations: 185
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 4 63 80.2 0.605 22
Electrode-Box-A2 4 46 60.4 0.484 14
Naive 4 76 59.6 0.492 26
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
564.95 584.27 -276.47 552.95
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.5232 0.058089 77.867 180
{'group_Electrode-Box-A2'} -0.1219 0.083374 -1.4621 180
{'group_Naive' } -0.36897 0.082023 -4.4984 180
{'day_c' } 0.10078 0.002307 43.684 180
{'day_c2' } -0.0064744 0.00024857 -26.047 180
pValue Lower Upper
1.4699e-140 4.4086 4.6379
0.14547 -0.28641 0.042619
1.2247e-05 -0.53082 -0.20712
9.6816e-98 0.096227 0.10533
5.8173e-63 -0.0069649 -0.0059839
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.11179
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 183
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
661.66 680.91 -324.83 649.66
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.62325 0.10794 5.7739 178
{'group_Electrode-Box-A2'} -0.33496 0.15306 -2.1884 178
{'group_Naive' } -0.64512 0.15201 -4.2441 178
{'day_c' } 0.12541 0.0034219 36.649 178
{'day_c2' } -0.0069611 0.00035344 -19.695 178
pValue Lower Upper
3.3843e-08 0.41024 0.83626
0.029941 -0.63701 -0.032914
3.5275e-05 -0.94509 -0.34516
7.5329e-85 0.11866 0.13216
1.4145e-46 -0.0076585 -0.0062636
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.20951
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
557.88 583.64 -270.94 541.88
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.5419 0.060057 75.626
{'group_Electrode-Box-A2' } -0.13686 0.086298 -1.5859
{'group_Naive' } -0.41002 0.085075 -4.8196
{'day_c' } 0.090967 0.0032463 28.021
{'day_c2' } -0.0068957 0.0002769 -24.904
{'group_Electrode-Box-A2:day_c'} 0.0071293 0.0064228 1.11
{'group_Naive:day_c' } 0.023329 0.0043517 5.3609
DF pValue Lower Upper
178 3.0366e-137 4.4233 4.6604
178 0.11453 -0.30716 0.033436
178 3.0699e-06 -0.57791 -0.24214
178 3.6033e-67 0.084561 0.097373
178 6.7558e-60 -0.0074422 -0.0063493
178 0.2685 -0.0055454 0.019804
178 2.5437e-07 0.014742 0.031917
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.11568
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=6.92, Box-A2 mean=7.95
Welch two-sided p=0.531, Mann-Whitney p=0.886 (nB=4, nA=4) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.13x Box-A2 (one-sided p=0.0719) -> not supported
[rate/level ] Box-B2 = 1.40x Box-A2 (one-sided p=0.0143) -> SUPPORTED
Per-animal (Box-B2 n=4 vs Box-A2 n=4), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0348, Mann-Whitney one-sided (B2>A2) p=0.0286
rate (per-subject pooled success/total): Welch two-sided p=0.0555, Mann-Whitney one-sided (B2>A2) p=0.0286
(No unknown groups -- they were merged into the anchors; only the H2 anchor
contrast applies.)
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+199
View File
@@ -0,0 +1,199 @@
==============================================================================
tDCS GLM report -- scenario: mergeB2_d0_10
==============================================================================
merge key: mergeB2 day window: 0..10 observations: 126
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 5 55 66.4 0.533 10
Electrode-Box-A2 3 28 52.1 0.433 10
Naive 4 43 46.8 0.440 10
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
297.84 314.85 -142.92 285.84
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.2369 0.08452 50.129 121
{'group_Electrode-Box-A2'} -0.091837 0.13759 -0.66748 121
{'group_Naive' } -0.39133 0.12596 -3.1068 121
{'day_c' } 0.2019 0.0052735 38.287 121
{'day_c2' } -0.024069 0.0015714 -15.317 121
pValue Lower Upper
8.553e-83 4.0696 4.4042
0.50574 -0.36423 0.18055
0.0023571 -0.64071 -0.14196
1.787e-69 0.19146 0.21235
4.1977e-30 -0.02718 -0.020958
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.18296
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 124
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
364.15 381.07 -176.07 352.15
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.11026 0.11374 0.96938 119
{'group_Electrode-Box-A2'} -0.26616 0.18448 -1.4427 119
{'group_Naive' } -0.53698 0.16912 -3.1751 119
{'day_c' } 0.21673 0.0069278 31.283 119
{'day_c2' } -0.013726 0.0021988 -6.2424 119
pValue Lower Upper
0.33432 -0.11496 0.33548
0.15172 -0.63144 0.09913
0.0019073 -0.87186 -0.2021
2.9856e-59 0.20301 0.23044
6.8729e-09 -0.01808 -0.009372
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.24468
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
304.98 327.67 -144.49 288.98
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.2592 0.082682 51.513
{'group_Electrode-Box-A2' } -0.10296 0.13455 -0.76522
{'group_Naive' } -0.46886 0.1243 -3.7722
{'day_c' } 0.1907 0.0067258 28.354
{'day_c2' } -0.02454 0.0015791 -15.541
{'group_Electrode-Box-A2:day_c'} -0.0023862 0.012062 -0.19783
{'group_Naive:day_c' } 0.045036 0.010729 4.1975
DF pValue Lower Upper
119 3.2785e-83 4.0955 4.423
119 0.44566 -0.36937 0.16346
119 0.00025365 -0.71498 -0.22275
119 9.114e-55 0.17738 0.20402
119 2.0273e-30 -0.027667 -0.021413
119 0.84352 -0.02627 0.021498
119 5.2317e-05 0.023791 0.066281
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.17816
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=9.74, Box-A2 mean=8.96
Welch two-sided p=0.517, Mann-Whitney p=0.571 (nB=5, nA=3) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0001, but with just
observation-level DF (df2=119) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.10x Box-A2 (one-sided p=0.2522) -> not supported
[rate/level ] Box-B2 = 1.30x Box-A2 (one-sided p=0.0745) -> not supported
Per-animal (Box-B2 n=5 vs Box-A2 n=3), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0228, Mann-Whitney one-sided (B2>A2) p=0.0179
rate (per-subject pooled success/total): Welch two-sided p=0.0943, Mann-Whitney one-sided (B2>A2) p=0.0714
(No unknown groups -- they were merged into the anchors; only the H2 anchor
contrast applies.)
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+199
View File
@@ -0,0 +1,199 @@
==============================================================================
tDCS GLM report -- scenario: mergeB2_full
==============================================================================
merge key: mergeB2 day window: 0..26 observations: 185
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 5 78 78.4 0.596 22
Electrode-Box-A2 3 31 55.4 0.448 13
Naive 4 76 59.6 0.492 26
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
565.84 585.16 -276.92 553.84
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.4986 0.054066 83.206 180
{'group_Electrode-Box-A2'} -0.096187 0.09052 -1.0626 180
{'group_Naive' } -0.34448 0.080981 -4.2538 180
{'day_c' } 0.10082 0.0023113 43.621 180
{'day_c2' } -0.00647 0.00024877 -26.008 180
pValue Lower Upper
1.3263e-145 4.3919 4.6053
0.28939 -0.2748 0.08243
3.3739e-05 -0.50427 -0.18468
1.2306e-97 0.096261 0.10538
7.2052e-63 -0.0069609 -0.0059791
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.1166
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 183
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
661.88 681.14 -324.94 649.88
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.57975 0.098046 5.913 178
{'group_Electrode-Box-A2'} -0.33262 0.16122 -2.0631 178
{'group_Naive' } -0.60174 0.14641 -4.1098 178
{'day_c' } 0.12534 0.0034238 36.607 178
{'day_c2' } -0.0069519 0.00035349 -19.666 178
pValue Lower Upper
1.6792e-08 0.38627 0.77323
0.040554 -0.65077 -0.014466
6.0348e-05 -0.89067 -0.31281
9.0274e-85 0.11858 0.13209
1.6927e-46 -0.0076494 -0.0062543
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.21289
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
560.22 585.99 -272.11 544.22
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.516 0.055699 81.079
{'group_Electrode-Box-A2' } -0.11558 0.094376 -1.2247
{'group_Naive' } -0.38342 0.083677 -4.5821
{'day_c' } 0.092386 0.0030001 30.794
{'day_c2' } -0.006943 0.00027446 -25.297
{'group_Electrode-Box-A2:day_c'} 0.0036285 0.0081693 0.44417
{'group_Naive:day_c' } 0.022361 0.0042611 5.2476
DF pValue Lower Upper
178 1.781e-142 4.4061 4.6259
178 0.22231 -0.30182 0.070658
178 8.6367e-06 -0.54854 -0.21829
178 3.1867e-73 0.086466 0.098307
178 7.6668e-61 -0.0074846 -0.0064014
178 0.65746 -0.012493 0.01975
178 4.3478e-07 0.013952 0.03077
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.12017
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=6.98, Box-A2 mean=8.19
Welch two-sided p=0.508, Mann-Whitney p=0.786 (nB=5, nA=3) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.10x Box-A2 (one-sided p=0.1440) -> not supported
[rate/level ] Box-B2 = 1.39x Box-A2 (one-sided p=0.0196) -> SUPPORTED
Per-animal (Box-B2 n=5 vs Box-A2 n=3), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0204, Mann-Whitney one-sided (B2>A2) p=0.0179
rate (per-subject pooled success/total): Welch two-sided p=0.0440, Mann-Whitney one-sided (B2>A2) p=0.0179
(No unknown groups -- they were merged into the anchors; only the H2 anchor
contrast applies.)
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+199
View File
@@ -0,0 +1,199 @@
==============================================================================
tDCS GLM report -- scenario: mergeNaive_full
==============================================================================
merge key: mergeNaive day window: 0..26 observations: 185
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 4 63 80.2 0.605 22
Electrode-Box-A 1 15 70.7 0.557 14
Electrode-Box-A2 7 107 58.4 0.479 26
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
569.28 588.6 -278.64 557.28
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.5235 0.074032 61.102
{'group_Electrode-Box-A' } -0.12346 0.16529 -0.74694
{'group_Electrode-Box-A2'} -0.26481 0.093039 -2.8462
{'day_c' } 0.10065 0.0023081 43.608
{'day_c2' } -0.0064638 0.00024915 -25.944
DF pValue Lower Upper
180 2.6809e-122 4.3774 4.6696
180 0.45607 -0.44962 0.2027
180 0.0049387 -0.44839 -0.081217
180 1.2924e-97 0.096096 0.10521
180 1.0244e-62 -0.0069555 -0.0059722
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.14464
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 183
Fixed effects coefficients 5
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
663.16 682.41 -325.58 651.16
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 0.62291 0.11692 5.3275
{'group_Electrode-Box-A' } -0.21631 0.26048 -0.83042
{'group_Electrode-Box-A2'} -0.5314 0.14632 -3.6318
{'day_c' } 0.12505 0.003415 36.618
{'day_c2' } -0.0069489 0.00035361 -19.651
DF pValue Lower Upper
178 2.981e-07 0.39218 0.85365
178 0.40742 -0.73034 0.29772
178 0.00036793 -0.82014 -0.24265
178 8.6013e-85 0.11831 0.13179
178 1.8602e-46 -0.0076467 -0.0062511
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.22797
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
561.97 587.73 -272.98 545.97
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.5372 0.083001 54.664
{'group_Electrode-Box-A' } -0.13394 0.18535 -0.72264
{'group_Electrode-Box-A2' } -0.27771 0.10424 -2.6641
{'day_c' } 0.090249 0.0032246 27.988
{'day_c2' } -0.0066704 0.00025769 -25.885
{'group_Electrode-Box-A:day_c' } 0.010369 0.0086089 1.2044
{'group_Electrode-Box-A2:day_c'} 0.020125 0.0041158 4.8897
DF pValue Lower Upper
178 3.3741e-113 4.3734 4.701
178 0.47085 -0.4997 0.23182
178 0.0084289 -0.48341 -0.071999
178 4.2889e-67 0.083886 0.096613
178 3.0498e-62 -0.0071789 -0.0061619
178 0.23002 -0.0066197 0.027358
178 2.2462e-06 0.012003 0.028247
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.16287
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=6.92, Box-A2 mean=6.25
Welch two-sided p=0.689, Mann-Whitney p=0.527 (nB=4, nA=7) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
observation-level DF (df2=178) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.30x Box-A2 (one-sided p=0.0022) -> SUPPORTED
[rate/level ] Box-B2 = 1.70x Box-A2 (one-sided p=0.0001) -> SUPPORTED
Per-animal (Box-B2 n=4 vs Box-A2 n=7), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0158, Mann-Whitney one-sided (B2>A2) p=0.0030
rate (per-subject pooled success/total): Welch two-sided p=0.0207, Mann-Whitney one-sided (B2>A2) p=0.0030
(No unknown groups -- they were merged into the anchors; only the H2 anchor
contrast applies.)
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+67
View File
@@ -0,0 +1,67 @@
==============================================================================
PAPER LME REPLICATION -- mergeA2
==============================================================================
model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
N = 8 rats, 109 sessions (day raw; day 0 = paper "Day 1")
day coverage: stim(B2) 0..22, control(A2) 0..14
** WARNING: unequal day coverage -- the full-range stim:day interaction
extrapolates the control group's line and is CONFOUNDED here (the paper's
groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
==============================================================================
FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 109
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
behavior ~ 1 + day*stim + (1 | rat)
Model fit statistics:
AIC BIC LogLikelihood Deviance
962.68 978.83 -475.34 950.68
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 20.701 4.9127 4.2138 105 5.3256e-05
{'day' } 6.8599 0.69872 9.8178 105 1.5726e-16
{'stim' } 22.092 6.4372 3.4319 105 0.00085848
{'day:stim' } -2.1793 0.81821 -2.6635 105 0.0089525
Lower Upper
10.96 30.442
5.4745 8.2453
9.3279 34.855
-3.8016 -0.55692
Random effects covariance parameters (95% CIs):
Group: rat (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 2.1043e-15
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 18.954 16.597 21.644
effect t (df) F (df1) p
------------------------------------------------------------------
stim x day (interaction) t(105)= -2.66 F(1)= 7.094 p=0.008953
day (learning) t(105)= 9.82 F(1)= 96.388 p=1.573e-16
stim (main, Day 1) t(105)= 3.43 F(1)= 11.778 p=0.0008585
interaction 95% CI: [-3.80, -0.56]
Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
+67
View File
@@ -0,0 +1,67 @@
==============================================================================
PAPER LME REPLICATION -- mergeB2
==============================================================================
model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
N = 8 rats, 109 sessions (day raw; day 0 = paper "Day 1")
day coverage: stim(B2) 0..22, control(A2) 0..13
** WARNING: unequal day coverage -- the full-range stim:day interaction
extrapolates the control group's line and is CONFOUNDED here (the paper's
groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
==============================================================================
FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 109
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
behavior ~ 1 + day*stim + (1 | rat)
Model fit statistics:
AIC BIC LogLikelihood Deviance
967.24 983.39 -477.62 955.24
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.7 5.9981 3.6178 105 0.00045861
{'day' } 6.4863 0.9412 6.8916 105 4.2336e-10
{'stim' } 17.493 7.1288 2.4538 105 0.015779
{'day:stim' } -1.4651 1.025 -1.4294 105 0.15586
Lower Upper
9.8069 33.593
4.6201 8.3526
3.3578 31.628
-3.4974 0.56726
Random effects covariance parameters (95% CIs):
Group: rat (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 2.1487e-15
Lower Upper
NaN NaN
Group: Error
Name Estimate Lower Upper
{'Res Std'} 19.354 16.948 22.101
effect t (df) F (df1) p
------------------------------------------------------------------
stim x day (interaction) t(105)= -1.43 F(1)= 2.043 p=0.1559
day (learning) t(105)= 6.89 F(1)= 47.494 p=4.234e-10
stim (main, Day 1) t(105)= 2.45 F(1)= 6.021 p=0.01578
interaction 95% CI: [-3.50, +0.57]
Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
@@ -0,0 +1,67 @@
==============================================================================
PAPER LME REPLICATION -- mergeNaive
==============================================================================
model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
N = 11 rats, 170 sessions (day raw; day 0 = paper "Day 1")
day coverage: stim(B2) 0..22, control(A2) 0..26
** WARNING: unequal day coverage -- the full-range stim:day interaction
extrapolates the control group's line and is CONFOUNDED here (the paper's
groups had equal coverage). See the _d0_13 fair-window and phased analyses. **
==============================================================================
FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 170
Fixed effects coefficients 4
Random effects coefficients 11
Covariance parameters 2
Formula:
behavior ~ 1 + day*stim + (1 | rat)
Model fit statistics:
AIC BIC LogLikelihood Deviance
1526.4 1545.2 -757.2 1514.4
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 30.553 4.7932 6.3742 166 1.7469e-09
{'day' } 3.5345 0.33399 10.583 166 2.5084e-20
{'stim' } 10.155 8.0021 1.2691 166 0.2062
{'day:stim' } 1.5835 0.58611 2.7018 166 0.0076138
Lower Upper
21.089 40.016
2.8751 4.1939
-5.6439 25.954
0.42633 2.7407
Random effects covariance parameters (95% CIs):
Group: rat (11 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 9.2449
Lower Upper
5.388 15.863
Group: Error
Name Estimate Lower Upper
{'Res Std'} 19.866 17.802 22.168
effect t (df) F (df1) p
------------------------------------------------------------------
stim x day (interaction) t(166)= 2.70 F(1)= 7.299 p=0.007614
day (learning) t(166)= 10.58 F(1)= 111.990 p=2.508e-20
stim (main, Day 1) t(166)= 1.27 F(1)= 1.611 p=0.2062
interaction 95% CI: [+0.43, +2.74]
Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
@@ -0,0 +1,64 @@
==============================================================================
PAPER LME REPLICATION -- unmerged
==============================================================================
model: behavior ~ stim + day + stim:day + (1|rat) [stim: Electrode-Box-B2=1 vs Electrode-Box-A2=0]
N = 6 rats, 71 sessions (day raw; day 0 = paper "Day 1")
day coverage: stim(B2) 0..14, control(A2) 0..13
==============================================================================
FULL MODEL SUMMARY -- fitlme: behavior ~ stim + day + stim:day + (1|rat)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 71
Fixed effects coefficients 4
Random effects coefficients 6
Covariance parameters 2
Formula:
behavior ~ 1 + day*stim + (1 | rat)
Model fit statistics:
AIC BIC LogLikelihood Deviance
596.33 609.9 -292.16 584.33
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 21.53 5.5382 3.8874 67 0.00023506
{'day' } 6.6587 0.72367 9.2014 67 1.6706e-13
{'stim' } 8.0204 7.6977 1.0419 67 0.3012
{'day:stim' } 0.93747 0.9187 1.0204 67 0.3112
Lower Upper
10.475 32.584
5.2143 8.1032
-7.3444 23.385
-0.89627 2.7712
Random effects covariance parameters (95% CIs):
Group: rat (6 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.7931
Lower Upper
2.4723 13.574
Group: Error
Name Estimate Lower Upper
{'Res Std'} 14.163 11.93 16.813
effect t (df) F (df1) p
------------------------------------------------------------------
stim x day (interaction) t(67)= 1.02 F(1)= 1.041 p=0.3112
day (learning) t(67)= 9.20 F(1)= 84.665 p=1.671e-13
stim (main, Day 1) t(67)= 1.04 F(1)= 1.086 p=0.3012
interaction 95% CI: [-0.90, +2.77]
Paper (N=24): interaction t(227)=2.68, F(1)=7.12, p=0.008; day t(227)=9.64,
F(1)=267.64, p=1.2e-18; stim t(227)=0.23, F(1)=0.053, p=0.81.
+155
View File
@@ -0,0 +1,155 @@
==============================================================================
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]
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.
==============================================================================
FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 48
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
381.01 392.23 -184.5 369.01
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 10.06 4.465 2.253 44 0.029296
{'dayp' } 10.543 1.27 8.3016 44 1.4943e-10
{'tDCS' } -2.5119 6.3144 -0.3978 44 0.6927
{'dayp:tDCS' } 4.6214 1.796 2.5731 44 0.013526
Lower Upper
1.061 19.058
7.9834 13.102
-15.238 10.214
1.0018 8.2411
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 4.5394
Lower Upper
1.7406 11.838
Group: Error
Name Estimate Lower Upper
{'Res Std'} 10.625 8.5345 13.229
==============================================================================
FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 35
Fixed effects coefficients 4
Random effects coefficients 7
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
265.24 274.57 -126.62 253.24
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 75.867 4.9313 15.385 31 4.6291e-16
{'dayp' } 3.1667 1.4366 2.2043 31 0.035054
{'tDCS' } 10.233 6.5234 1.5687 31 0.12687
{'dayp:tDCS' } 1.6583 1.9004 0.87262 31 0.38958
Lower Upper
65.809 85.924
0.23676 6.0966
-3.0713 23.538
-2.2176 5.5342
Random effects covariance parameters (95% CIs):
Group: subject (7 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.9837
Lower Upper
2.9396 12.18
Group: Error
Name Estimate Lower Upper
{'Res Std'} 7.8684 6.0554 10.224
==============================================================================
FULL MODEL SUMMARY -- phase 6-13: 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 7
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
367.22 378.69 -177.61 355.22
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 76.4 4.9765 15.352 46 1.0096e-19
{'dayp' } 2.9189 0.74973 3.8932 46 0.00031772
{'tDCS' } 10.289 6.5773 1.5643 46 0.12459
{'dayp:tDCS' } 1.554 0.97562 1.5928 46 0.11805
Lower Upper
66.382 86.417
1.4097 4.428
-2.9502 23.528
-0.40985 3.5178
Random effects covariance parameters (95% CIs):
Group: subject (7 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 7.1357
Lower Upper
3.9247 12.974
Group: Error
Name Estimate Lower Upper
{'Res Std'} 7.3202 5.9279 9.0395
+155
View File
@@ -0,0 +1,155 @@
==============================================================================
PHASED days x tDCS LME -- mergeB2 (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 9.86 14.65 2.9e-08 0.399 0.013 +4.79 [+1.06, +8.53]
6-10 7 2.40 4.80 0.18 0.142 0.253 +2.40 [-1.80, +6.60]
6-13 7 1.71 4.42 0.083 0.127 0.018 +2.71 [+0.50, +4.93]
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.
==============================================================================
FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 48
Fixed effects coefficients 4
Random effects coefficients 8
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
383.06 394.29 -185.53 371.06
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 12.524 5.5254 2.2666 44 0.028385
{'dayp' } 9.8571 1.4654 6.7268 44 2.8783e-08
{'tDCS' } -5.9524 6.9892 -0.85166 44 0.39902
{'dayp:tDCS' } 4.7943 1.8536 2.5865 44 0.013079
Lower Upper
1.3881 23.66
6.9039 12.81
-20.038 8.1334
1.0587 8.5299
Random effects covariance parameters (95% CIs):
Group: subject (8 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.7044
Lower Upper
2.6066 12.484
Group: Error
Name Estimate Lower Upper
{'Res Std'} 10.618 8.5282 13.219
==============================================================================
FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 35
Fixed effects coefficients 4
Random effects coefficients 7
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
264.22 273.56 -126.11 252.22
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 74.2 5.8956 12.586 31 1.0133e-13
{'dayp' } 2.4 1.7415 1.3781 31 0.17803
{'tDCS' } 10.52 6.9757 1.5081 31 0.14166
{'dayp:tDCS' } 2.4 2.0606 1.1647 31 0.25302
Lower Upper
62.176 86.224
-1.1518 5.9518
-3.7071 24.747
-1.8026 6.6026
Random effects covariance parameters (95% CIs):
Group: subject (7 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 5.7551
Lower Upper
2.7955 11.848
Group: Error
Name Estimate Lower Upper
{'Res Std'} 7.7883 5.9937 10.12
==============================================================================
FULL MODEL SUMMARY -- phase 6-13: 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 7
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
362.57 374.04 -175.28 350.57
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 75.168 5.6188 13.378 46 1.8212e-17
{'dayp' } 1.712 0.96716 1.7701 46 0.083338
{'tDCS' } 10.291 6.6299 1.5522 46 0.12747
{'dayp:tDCS' } 2.7116 1.1009 2.4631 46 0.017575
Lower Upper
63.858 86.478
-0.23482 3.6588
-3.0544 23.636
0.49565 4.9275
Random effects covariance parameters (95% CIs):
Group: subject (7 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 6.379
Lower Upper
3.4793 11.695
Group: Error
Name Estimate Lower Upper
{'Res Std'} 7.0508 5.7111 8.7047
@@ -0,0 +1,155 @@
==============================================================================
PHASED days x tDCS LME -- mergeNaive (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 11 8.26 15.16 1.6e-10 0.852 0.000 +6.90 [+3.40, +10.41]
6-10 10 5.97 4.83 3.9e-05 0.007 0.584 -1.14 [-5.31, +3.03]
6-13 10 2.83 4.47 0.00071 0.012 0.196 +1.65 [-0.87, +4.17]
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.
==============================================================================
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
+155
View File
@@ -0,0 +1,155 @@
==============================================================================
PHASED days x tDCS LME -- unmerged (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 6 9.86 15.22 1.6e-07 0.689 0.015 +5.36 [+1.11, +9.62]
6-10 5 2.40 4.17 0.23 0.098 0.486 +1.77 [-3.41, +6.95]
6-13 5 1.71 3.98 0.12 0.101 0.097 +2.27 [-0.44, +4.97]
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.
==============================================================================
FULL MODEL SUMMARY -- phase 0-5: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 36
Fixed effects coefficients 4
Random effects coefficients 6
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
289.66 299.16 -138.83 277.66
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 12.524 5.2775 2.3731 32 0.023816
{'dayp' } 9.8571 1.4772 6.6729 32 1.5706e-07
{'tDCS' } -3.0159 7.4635 -0.40408 32 0.68884
{'dayp:tDCS' } 5.3619 2.089 2.5667 32 0.015149
Lower Upper
1.7739 23.274
6.8482 12.866
-18.219 12.187
1.1067 9.6172
Random effects covariance parameters (95% CIs):
Group: subject (6 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 4.8527
Lower Upper
1.7069 13.796
Group: Error
Name Estimate Lower Upper
{'Res Std'} 10.703 8.3104 13.785
==============================================================================
FULL MODEL SUMMARY -- phase 6-10: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 25
Fixed effects coefficients 4
Random effects coefficients 5
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
196.97 204.29 -92.486 184.97
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 74.2 6.4017 11.591 21 1.3774e-10
{'dayp' } 2.4 1.9295 1.2439 21 0.22726
{'tDCS' } 14.333 8.2646 1.7343 21 0.097522
{'dayp:tDCS' } 1.7667 2.491 0.70923 21 0.48598
Lower Upper
60.887 87.513
-1.6126 6.4126
-2.8539 31.521
-3.4136 6.9469
Random effects covariance parameters (95% CIs):
Group: subject (5 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 6.1065
Lower Upper
2.5428 14.665
Group: Error
Name Estimate Lower Upper
{'Res Std'} 8.6289 6.3295 11.764
==============================================================================
FULL MODEL SUMMARY -- phase 6-13: success ~ dayp*tDCS + (1|subject)
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 34
Fixed effects coefficients 4
Random effects coefficients 5
Covariance parameters 2
Formula:
success ~ 1 + dayp*tDCS + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
257.04 266.2 -122.52 245.04
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 75.17 6.2311 12.064 30 4.8879e-13
{'dayp' } 1.7101 1.061 1.6117 30 0.11749
{'tDCS' } 13.563 8.0252 1.69 30 0.1014
{'dayp:tDCS' } 2.267 1.3237 1.7126 30 0.097101
Lower Upper
62.445 87.896
-0.45682 3.877
-2.8271 29.952
-0.43635 4.9703
Random effects covariance parameters (95% CIs):
Group: subject (5 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 7.1166
Lower Upper
3.4834 14.539
Group: Error
Name Estimate Lower Upper
{'Res Std'} 7.7328 5.9847 9.9914
+232
View File
@@ -0,0 +1,232 @@
==============================================================================
tDCS GLM report -- scenario: unmerged_d0_10
==============================================================================
merge key: unmerged day window: 0..10 observations: 126
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 3 33 70.0 0.555 10
Electrode-Box-A 1 11 58.9 0.499 10
Electrode-Box-A2 3 28 52.1 0.433 10
Naive 4 43 46.8 0.440 10
Right-Electrode 1 11 63.4 0.499 10
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
301.01 323.7 -142.51 285.01
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.2892 0.10522 40.765 119
{'group_Electrode-Box-A' } -0.16759 0.20935 -0.80052 119
{'group_Electrode-Box-A2'} -0.14442 0.14887 -0.97013 119
{'group_Naive' } -0.44336 0.13882 -3.1938 119
{'group_Right-Electrode' } -0.094696 0.20909 -0.45289 119
{'day_c' } 0.20188 0.0052727 38.287 119
{'day_c2' } -0.024069 0.0015714 -15.317 119
pValue Lower Upper
9.1655e-72 4.0809 4.4976
0.425 -0.58213 0.24695
0.33395 -0.43919 0.15035
0.0017973 -0.71824 -0.16848
0.65145 -0.50872 0.31933
9.4346e-69 0.19144 0.21232
6.4425e-30 -0.02718 -0.020957
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.17716
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 124
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
366.74 389.3 -175.37 350.74
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.21772 0.13736 1.585 117
{'group_Electrode-Box-A' } -0.27791 0.2726 -1.0195 117
{'group_Electrode-Box-A2'} -0.37423 0.19356 -1.9334 117
{'group_Naive' } -0.64393 0.18075 -3.5625 117
{'group_Right-Electrode' } -0.25889 0.27218 -0.95118 117
{'day_c' } 0.21668 0.0069264 31.283 117
{'day_c2' } -0.013737 0.0021988 -6.2475 117
pValue Lower Upper
0.11567 -0.054325 0.48976
0.31008 -0.81779 0.26196
0.0556 -0.75756 0.0091015
0.0005325 -1.0019 -0.28596
0.34348 -0.79792 0.28014
1.1453e-58 0.20296 0.2304
6.9755e-09 -0.018092 -0.0093824
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.22892
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 126
Fixed effects coefficients 11
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
305.19 339.23 -140.6 281.19
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.3338 0.10278 42.165
{'group_Electrode-Box-A' } -0.23805 0.20569 -1.1574
{'group_Electrode-Box-A2' } -0.17701 0.14533 -1.218
{'group_Naive' } -0.54258 0.13655 -3.9736
{'group_Right-Electrode' } -0.15185 0.20519 -0.74005
{'day_c' } 0.17638 0.0080904 21.802
{'day_c2' } -0.024639 0.0015803 -15.591
{'group_Electrode-Box-A:day_c' } 0.044079 0.016893 2.6093
{'group_Electrode-Box-A2:day_c'} 0.011922 0.012896 0.92443
{'group_Naive:day_c' } 0.059567 0.011689 5.0961
{'group_Right-Electrode:day_c' } 0.036369 0.016336 2.2263
DF pValue Lower Upper
115 8.6925e-72 4.1302 4.5374
115 0.24953 -0.64548 0.16937
115 0.22572 -0.46489 0.11086
115 0.00012391 -0.81305 -0.27211
115 0.46078 -0.5583 0.25459
115 1.1738e-42 0.16036 0.19241
115 3.8845e-30 -0.027769 -0.021509
115 0.010278 0.010617 0.07754
115 0.3572 -0.013623 0.037467
115 1.3744e-06 0.036414 0.08272
115 0.027945 0.00401 0.068729
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.17214
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=9.52, Box-A2 mean=8.96
Welch two-sided p=0.643, Mann-Whitney p=0.700 (nB=3, nA=3) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
observation-level DF (df2=115) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.16x Box-A2 (one-sided p=0.1660) -> not supported
[rate/level ] Box-B2 = 1.45x Box-A2 (one-sided p=0.0266) -> SUPPORTED
Per-animal (Box-B2 n=3 vs Box-A2 n=3), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0414, Mann-Whitney one-sided (B2>A2) p=0.0500
rate (per-subject pooled success/total): Welch two-sided p=0.0702, Mann-Whitney one-sided (B2>A2) p=0.0500
Classification -- is each UNKNOWN condition A2-like or B2-like?
(ratio >1 = above that anchor; p = differs from that anchor)
Electrode-Box-A:
[count/level] vs Box-A2: 0.98x p=0.912 vs Box-B2: 0.85x p=0.425
-> AMBIGUOUS (nearer Electrode-Box-A2)
[rate/level ] vs Box-A2: 1.10x p=0.725 vs Box-B2: 0.76x p=0.310
-> AMBIGUOUS (nearer Electrode-Box-A2)
Right-Electrode:
[count/level] vs Box-A2: 1.05x p=0.813 vs Box-B2: 0.91x p=0.651
-> AMBIGUOUS (nearer Electrode-Box-A2)
[rate/level ] vs Box-A2: 1.12x p=0.673 vs Box-B2: 0.77x p=0.343
-> AMBIGUOUS (nearer Electrode-Box-A2)
NOTE: each unknown has ONLY 1 subject. 'Matches' means 'not statistically
distinguishable', weak evidence at n=1, not proof of equivalence.
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.
+232
View File
@@ -0,0 +1,232 @@
==============================================================================
tDCS GLM report -- scenario: unmerged_full
==============================================================================
merge key: unmerged day window: 0..26 observations: 185
==============================================================================
DESCRIPTIVES
==============================================================================
group n_subj n_sessions mean_success mean_rate max_day
--------------------------------------------------------------------------
Electrode-Box-B2 3 40 77.0 0.591 14
Electrode-Box-A 1 15 70.7 0.557 14
Electrode-Box-A2 3 31 55.4 0.448 13
Naive 4 76 59.6 0.492 26
Right-Electrode 1 23 85.8 0.627 22
==============================================================================
(A) LEVEL / COUNT -- Poisson GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
567.38 593.14 -275.69 551.38
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 4.5636 0.062818 72.648 178
{'group_Electrode-Box-A' } -0.16366 0.1251 -1.3082 178
{'group_Electrode-Box-A2'} -0.16301 0.090874 -1.7939 178
{'group_Naive' } -0.41017 0.083133 -4.9339 178
{'group_Right-Electrode' } -0.15781 0.12382 -1.2745 178
{'day_c' } 0.10084 0.0023114 43.629 178
{'day_c2' } -0.0064669 0.00024857 -26.016 178
pValue Lower Upper
3.0937e-134 4.4397 4.6876
0.19249 -0.41052 0.083214
0.074534 -0.34234 0.016314
1.8418e-06 -0.57422 -0.24612
0.20416 -0.40216 0.086543
5.5938e-97 0.096281 0.1054
1.4969e-62 -0.0069574 -0.0059764
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.10379
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 183
Fixed effects coefficients 7
Random effects coefficients 12
Covariance parameters 1
Distribution Binomial
Link Logit
FitMethod MPL
Formula:
success ~ 1 + group + day_c + day_c2 + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
664.34 690.01 -324.17 648.34
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)' } 0.67246 0.11921 5.6411 176
{'group_Electrode-Box-A' } -0.2656 0.23687 -1.1213 176
{'group_Electrode-Box-A2'} -0.42592 0.16928 -2.5161 176
{'group_Naive' } -0.69483 0.15707 -4.4236 176
{'group_Right-Electrode' } -0.19395 0.23547 -0.82369 176
{'day_c' } 0.12539 0.0034255 36.605 176
{'day_c2' } -0.0069542 0.0003534 -19.678 176
pValue Lower Upper
6.6327e-08 0.4372 0.90772
0.26369 -0.73306 0.20187
0.012762 -0.75999 -0.091839
1.6969e-05 -1.0048 -0.38484
0.41123 -0.65866 0.27075
3.2383e-84 0.11863 0.13215
2.5332e-46 -0.0076517 -0.0062568
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.19922
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
==============================================================================
(C) LEARNING RATE -- Poisson GLMM (group x day interaction)
==============================================================================
Generalized linear mixed-effects model fit by PL
Model information:
Number of observations 185
Fixed effects coefficients 11
Random effects coefficients 12
Covariance parameters 1
Distribution Poisson
Link Log
FitMethod MPL
Formula:
success ~ 1 + day_c2 + group*day_c + (1 | subject)
Model fit statistics:
AIC BIC LogLikelihood Deviance
566.35 604.99 -271.17 542.35
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat
{'(Intercept)' } 4.5639 0.066952 68.167
{'group_Electrode-Box-A' } -0.1538 0.13339 -1.1531
{'group_Electrode-Box-A2' } -0.16353 0.097941 -1.6697
{'group_Naive' } -0.4286 0.088752 -4.8292
{'group_Right-Electrode' } -0.10141 0.13294 -0.76285
{'day_c' } 0.084832 0.0050395 16.833
{'day_c2' } -0.0071091 0.00030673 -23.177
{'group_Electrode-Box-A:day_c' } 0.015434 0.0094241 1.6377
{'group_Electrode-Box-A2:day_c'} 0.010314 0.0089464 1.1529
{'group_Naive:day_c' } 0.031147 0.0065742 4.7377
{'group_Right-Electrode:day_c' } 0.011613 0.007034 1.651
DF pValue Lower Upper
174 1.9324e-127 4.4318 4.6961
174 0.25047 -0.41707 0.10946
174 0.096774 -0.35684 0.029772
174 2.9893e-06 -0.60377 -0.25343
174 0.44659 -0.3638 0.16097
174 2.3384e-38 0.074885 0.094778
174 4.4285e-55 -0.0077145 -0.0065037
174 0.10329 -0.0031665 0.034034
174 0.25055 -0.0073435 0.027971
174 4.4703e-06 0.018171 0.044122
174 0.10054 -0.0022698 0.025496
Random effects covariance parameters:
Group: subject (12 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.11116
Group: Error
Name Estimate
{'sqrt(Dispersion)'} 1
Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:
Per-subject OLS slope of success vs day: Box-B2 mean=7.96, Box-A2 mean=8.19
Welch two-sided p=0.896, Mann-Whitney p=1.000 (nB=3, nA=3) -> parallel learning (no slope difference detected)
(Reference only: the GLMM group x day_c joint F-test gives p=0.0000, but with just
observation-level DF (df2=174) it is ANTICONSERVATIVE for this few-subject design and is
NOT the basis for the conclusion above.)
==============================================================================
INTERPRETATION
==============================================================================
Note: these are subject-level GLMMs (Laplace-approximated fitglme), not the
Python reference's population-average GEE -- directions/magnitudes should agree,
exact ratios and p-values will differ.
Anchor check -- H2: Box-B2 BETTER than Box-A2 (the two anchors must differ)
[count/level] Box-B2 = 1.18x Box-A2 (one-sided p=0.0364) -> SUPPORTED
[rate/level ] Box-B2 = 1.53x Box-A2 (one-sided p=0.0059) -> SUPPORTED
Per-animal (Box-B2 n=3 vs Box-A2 n=3), pure stats (no GLME):
count (per-subject mean success): Welch two-sided p=0.0552, Mann-Whitney one-sided (B2>A2) p=0.0500
rate (per-subject pooled success/total): Welch two-sided p=0.0722, Mann-Whitney one-sided (B2>A2) p=0.0500
Classification -- is each UNKNOWN condition A2-like or B2-like?
(ratio >1 = above that anchor; p = differs from that anchor)
Electrode-Box-A:
[count/level] vs Box-A2: 1.00x p=0.996 vs Box-B2: 0.85x p=0.192
-> AMBIGUOUS (nearer Electrode-Box-A2)
[rate/level ] vs Box-A2: 1.17x p=0.501 vs Box-B2: 0.77x p=0.264
-> AMBIGUOUS (nearer Electrode-Box-A2)
Right-Electrode:
[count/level] vs Box-A2: 1.01x p=0.967 vs Box-B2: 0.85x p=0.204
-> AMBIGUOUS (nearer Electrode-Box-A2)
[rate/level ] vs Box-A2: 1.26x p=0.328 vs Box-B2: 0.82x p=0.411
-> AMBIGUOUS (nearer Electrode-Box-B2)
NOTE: each unknown has ONLY 1 subject. 'Matches' means 'not statistically
distinguishable', weak evidence at n=1, not proof of equivalence.
==============================================================================
CAVEATS
==============================================================================
- Tiny groups: each arm has only n=3-4 subjects (Naive n=4; anchor arms n=3-5
depending on merge), and -- in unmerged scenarios -- each unknown condition
(Electrode-Box-A, Right-Electrode) has only n=1 subject. Treat every group
comparison here as preliminary.
- Single-subject classification: for a 1-subject unknown, 'matches anchor X'
means 'not statistically distinguishable from X', NOT proof of equivalence;
inference with a single subject in a group is fragile.
- Count vs rate: 'success' alone is a raw count; the rate model
(success/attempts) is the fairer accuracy comparison when attempt counts differ
between groups.