feat(matlab): add 0-13 day window (lme_*_d0_13) + coverage warning
Box-A2 has no data past ~day 13, so the full-range days x tDCS interaction extrapolates A2's slope and is confounded (spuriously significant, wrong sign). Add the _d0_13 window (equal anchor coverage) and a report warning when the two groups' day coverage is unequal. In the fair 0-13 window the interaction is n.s. with a POSITIVE slope diff and the Day-1 tDCS effect is n.s. -- matching the paper's 'equal on Day 1' direction (underpowered at n=8). Suite 32/32. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -10,9 +10,11 @@ function tdcs_glm(scenario)
|
||||
% mergeA2_full, mergeA2_d0_10,
|
||||
% mergeB2_full, mergeB2_d0_10
|
||||
% or a linear "days x tDCS" mixed model (Box-B2 vs Box-A2, per the paper):
|
||||
% lme_unmerged_full, lme_unmerged_d0_10,
|
||||
% lme_mergeA2_full, lme_mergeA2_d0_10,
|
||||
% lme_mergeB2_full, lme_mergeB2_d0_10
|
||||
% lme_unmerged_full, lme_unmerged_d0_10, lme_unmerged_d0_13,
|
||||
% lme_mergeA2_full, lme_mergeA2_d0_10, lme_mergeA2_d0_13,
|
||||
% lme_mergeB2_full, lme_mergeB2_d0_10, lme_mergeB2_d0_13
|
||||
% The _d0_13 window ends where Box-A2 runs out of data, giving both anchor
|
||||
% groups equal day coverage (the fair window for the interaction).
|
||||
%
|
||||
% Each case below is a self-contained, independently invocable call of
|
||||
% the same three-function pipeline; they are enumerated explicitly
|
||||
@@ -83,6 +85,18 @@ switch scenario
|
||||
L = tdcs_lme(tdcs_scenario_data('mergeB2_d0_10'), cfg);
|
||||
tdcs_lme_report(L, 'lme_mergeB2_d0_10', cfg);
|
||||
|
||||
case 'lme_unmerged_d0_13'
|
||||
L = tdcs_lme(tdcs_scenario_data('unmerged_d0_13'), cfg);
|
||||
tdcs_lme_report(L, 'lme_unmerged_d0_13', cfg);
|
||||
|
||||
case 'lme_mergeA2_d0_13'
|
||||
L = tdcs_lme(tdcs_scenario_data('mergeA2_d0_13'), cfg);
|
||||
tdcs_lme_report(L, 'lme_mergeA2_d0_13', cfg);
|
||||
|
||||
case 'lme_mergeB2_d0_13'
|
||||
L = tdcs_lme(tdcs_scenario_data('mergeB2_d0_13'), cfg);
|
||||
tdcs_lme_report(L, 'lme_mergeB2_d0_13', cfg);
|
||||
|
||||
otherwise
|
||||
error('tdcs_glm:badScenario', ...
|
||||
['Unrecognized scenario "%s". Valid scenarios are: ' ...
|
||||
|
||||
Reference in New Issue
Block a user