analysis(matlab): rate + count outputs, variation batch 1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 02:32:51 -04:00
parent 1009f263e8
commit 0a438a4649
72 changed files with 1873 additions and 895 deletions
@@ -0,0 +1,68 @@
==============================================================================
VARIATION: boxa_b2_d0_10 [metric: success RATE (success/attempts)]
==============================================================================
model: behavior ~ stim + day + stim:day + (1|rat) (behavior = success RATE (success/attempts))
day = training day within window (0 = first analyzed day)
treatment (stim=1): Electrode-Box-A, Electrode-Box-B2
control (stim=0): Electrode-Box-A2
N = 7 rats, 72 sessions raw day coverage: treat 0..10, control 0..10
(equal day coverage over this window)
==============================================================================
FULL MODEL SUMMARY -- fitlme
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 72
Fixed effects coefficients 4
Random effects coefficients 7
Covariance parameters 2
Formula:
behavior ~ 1 + day*stim + (1 | rat)
Model fit statistics:
AIC BIC LogLikelihood Deviance
-125.6 -111.94 68.799 -137.6
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF pValue
{'(Intercept)'} 0.22991 0.038687 5.9428 68 1.07e-07
{'day' } 0.040788 0.0055544 7.3434 68 3.402e-10
{'stim' } 0.0034269 0.050885 0.067345 68 0.9465
{'day:stim' } 0.013172 0.0069458 1.8964 68 0.062154
Lower Upper
0.15271 0.30711
0.029705 0.051872
-0.098113 0.10497
-0.00068802 0.027032
Random effects covariance parameters (95% CIs):
Group: rat (7 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.043995
Lower Upper
0.020897 0.092622
Group: Error
Name Estimate Lower Upper
{'Res Std'} 0.087482 0.073647 0.10392
effect t(df) / F(df1) p (resid) Satterthwaite: p (df)
----------------------------------------------------------------------------
stim x day (interaction) t(68)= 1.90 F(1)= 3.596 p=0.06215 p=0.06217 (df=68)
day (learning) t(68)= 7.34 F(1)= 53.926 p=3.402e-10 p=3.124e-10 (df=69)
stim (main, window start) t(68)= 0.07 F(1)= 0.005 p=0.9465 p=0.9471 (df=18)
interaction 95% CI: [-0.000688, +0.02703]
HONEST LME (per-animal random slope, day|rat): interaction F(1,62.1)=3.56, p=0.06388
(Satterthwaite DF ~= residual on this random-intercept model; the random-slope
model above is the honest learning-rate test -- DF collapses toward the animal count.)
INTERPRETATION: stim x day interaction n.s. -- slopes parallel (no differential learning rate) (p=0.06215, slope diff=+0.01317)
Paper (N=24, count): interaction t(227)=2.68, F(1)=7.12, p=0.008.