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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 02:32:52 -04:00
parent 6ba21a1a35
commit 0e16690c8f
72 changed files with 1875 additions and 897 deletions
@@ -0,0 +1,68 @@
==============================================================================
VARIATION: naive_boxa_d0_5 [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-B2
control (stim=0): Electrode-Box-A, Electrode-Box-A2, Naive
N = 11 rats, 63 sessions raw day coverage: treat 0..5, control 0..5
(equal day coverage over this window)
==============================================================================
FULL MODEL SUMMARY -- fitlme
==============================================================================
Linear mixed-effects model fit by ML
Model information:
Number of observations 63
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
-89.552 -76.693 50.776 -101.55
Fixed effects coefficients (95% CIs):
Name Estimate SE tStat DF
{'(Intercept)'} 0.20761 0.03353 6.1919 59
{'day' } 0.035262 0.0090474 3.8975 59
{'stim' } -0.042773 0.060953 -0.70173 59
{'day:stim' } 0.057126 0.016495 3.4631 59
pValue Lower Upper
6.1978e-08 0.14052 0.27471
0.000251 0.017158 0.053365
0.4856 -0.16474 0.079194
0.0010002 0.024119 0.090133
Random effects covariance parameters (95% CIs):
Group: rat (11 Levels)
Name1 Name2 Type Estimate
{'(Intercept)'} {'(Intercept)'} {'std'} 0.050413
Lower Upper
0.02388 0.10643
Group: Error
Name Estimate Lower Upper
{'Res Std'} 0.099938 0.082348 0.12129
effect t(df) / F(df1) p (resid) Satterthwaite: p (df)
----------------------------------------------------------------------------
stim x day (interaction) t(59)= 3.46 F(1)= 11.993 p=0.001 p=0.00108 (df=52)
day (learning) t(59)= 3.90 F(1)= 15.190 p=0.000251 p=0.0002756 (df=53)
stim (main, window start) t(59)= -0.70 F(1)= 0.492 p=0.4856 p=0.4879 (df=32)
interaction 95% CI: [+0.02412, +0.09013]
HONEST LME (per-animal random slope, day|rat): interaction F(1,12.0)=9.63, p=0.009127
(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 SIGNIFICANT positive -- treatment improves FASTER (benefit accumulates) (p=0.001, slope diff=+0.05713)
Paper (N=24, count): interaction t(227)=2.68, F(1)=7.12, p=0.008.