analysis(matlab): formalize cross-study (current vs _f) rate comparison

Add make_crossstudy_compare.m producing crossstudy/result.txt +
crossstudy_summary.csv: current control (A2, A2+Naive) and anodal (B2) arms
vs the previous study's a2_f/b2_f, on per-animal success RATE, at full range
(0-9 both) and attempt-matched (current 0-3 vs previous full).

Finding: current > previous for both arms at full range (B2 0.54 vs 0.41
p=0.024; A2+Naive 0.42 vs 0.33 p=0.014) but the gap vanishes/reverses at
matched effort (B2 0.33 vs 0.41 n.s.; A2 0.30 vs 0.33 n.s.) -- a practice/
attempts artifact (~2.7x more attempts/session), not a stronger cohort.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-22 15:21:33 -04:00
parent 9af33e747e
commit 5fcd97f81a
3 changed files with 140 additions and 0 deletions
@@ -0,0 +1,7 @@
arm,current,mode,window,nCur,rateCur,cumAttCur,prev,ratePrev,cumAttPrev,welchP,mwuP
Control,A2,full,0-9,3,0.422221769664046,1021.66666666667,a2_f,0.332589396921808,384.166666666667,0.15806572958032,0.101098901098901
Control,A2,matched,0-3,3,0.299133032915361,361,a2_f,0.332589396921808,384.166666666667,0.480083751892036,0.536263736263736
Control,A2+Naive,full,0-9,7,0.41833141401484,1011.85714285714,a2_f,0.332589396921808,384.166666666667,0.0135445411684472,0.0283400809716599
Control,A2+Naive,matched,0-3,7,0.26415993029607,293.714285714286,a2_f,0.332589396921808,384.166666666667,0.0948629941799642,0.119830118282131
Anodal,B2,full,0-9,3,0.536727902171637,1232.66666666667,b2_f,0.405880120526244,426.583333333333,0.0244732462562875,0.0703296703296703
Anodal,B2,matched,0-3,3,0.332091503267974,392.333333333333,b2_f,0.405880120526244,426.583333333333,0.0731567689117918,0.101098901098901
1 arm current mode window nCur rateCur cumAttCur prev ratePrev cumAttPrev welchP mwuP
2 Control A2 full 0-9 3 0.422221769664046 1021.66666666667 a2_f 0.332589396921808 384.166666666667 0.15806572958032 0.101098901098901
3 Control A2 matched 0-3 3 0.299133032915361 361 a2_f 0.332589396921808 384.166666666667 0.480083751892036 0.536263736263736
4 Control A2+Naive full 0-9 7 0.41833141401484 1011.85714285714 a2_f 0.332589396921808 384.166666666667 0.0135445411684472 0.0283400809716599
5 Control A2+Naive matched 0-3 7 0.26415993029607 293.714285714286 a2_f 0.332589396921808 384.166666666667 0.0948629941799642 0.119830118282131
6 Anodal B2 full 0-9 3 0.536727902171637 1232.66666666667 b2_f 0.405880120526244 426.583333333333 0.0244732462562875 0.0703296703296703
7 Anodal B2 matched 0-3 3 0.332091503267974 392.333333333333 b2_f 0.405880120526244 426.583333333333 0.0731567689117918 0.101098901098901
+29
View File
@@ -0,0 +1,29 @@
============================================================================================
CROSS-STUDY COMPARISON: current vs previous (Forouzan, _f) -- per-animal success RATE
============================================================================================
Metric: per-animal rate = sum(success)/sum(attempts). Rate is used because the
current protocol runs ~2.7x more attempts/session, so raw counts are not comparable.
Anodal = Box-B2 (contralateral tDCS); control = Box-A2 (ipsilateral sham) +/- Naive.
Previous study: b2_f = Anodal, a2_f = Control (validated: b2_f reproduces the paper's
positive tDCS x day interaction). "matched" = current days 0-3 vs previous full 0-9,
equalising cumulative attempts (the previous study's whole span ~= current's first 3 days).
arm current window nCur rate cumAtt prev rate cumAtt Welch p MWU p
-----------------------------------------------------------------------------------------------
Control A2 0-9 3 0.422 1022 a2_f 0.333 384 0.158 0.101
Control A2 0-3 3 0.299 361 a2_f 0.333 384 0.480 0.536
Control A2+Naive 0-9 7 0.418 1012 a2_f 0.333 384 0.014 0.028
Control A2+Naive 0-3 7 0.264 294 a2_f 0.333 384 0.095 0.120
Anodal B2 0-9 3 0.537 1233 b2_f 0.406 427 0.024 0.070
Anodal B2 0-3 3 0.332 392 b2_f 0.406 427 0.073 0.101
INTERPRETATION
- FULL range (0-9 both): current > previous for BOTH arms (control and anodal),
e.g. B2 0.54 vs b2_f 0.41 (p=0.024); A2+Naive 0.42 vs a2_f 0.33 (p=0.014).
- MATCHED effort (current 0-3 vs previous full): the gap disappears and slightly
reverses -- B2 0.33 vs b2_f 0.41 (n.s.); A2 0.30 vs a2_f 0.33 (n.s.).
=> The current study's apparent superiority is a PRACTICE/ATTEMPTS artifact: its
protocol packs ~2.7x more attempts/session, pushing every arm further along the
learning curve by a given day. At equal effort the two cohorts perform the same.
Note: A2+Naive 0-3 is slightly under-matched on attempts (294 vs ~384); A2-alone
0-3 (361 vs 384) is the cleaner apples-to-apples match.