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:
@@ -33,6 +33,7 @@ s = [s sprintf('model per phase: success ~ dayp*tDCS + (1|subject) [dayp = day
|
||||
s = [s sprintf('%-9s N A2slope B2slope day p tDCS(lvl) p interaction p slopeDiff [95%% CI]\n', 'phase')];
|
||||
s = [s sprintf('%s\n', repmat('-', 1, 92))];
|
||||
|
||||
rawSummaries = '';
|
||||
for k = 1:numel(phases)
|
||||
ph = phases{k};
|
||||
Tp = T(T.day >= ph(1) & T.day <= ph(2), :);
|
||||
@@ -59,12 +60,18 @@ for k = 1:numel(phases)
|
||||
s = [s sprintf('%d-%-6d %d %6.2f %6.2f %-9.2g %-11.3f %-13.3f %+.2f [%+.2f, %+.2f]\n', ...
|
||||
ph(1), ph(2), e.nSub, e.a2Slope, e.b2Slope, e.dayP, e.tDCSlevelP, ...
|
||||
e.interP, e.interEst, e.interCI(1), e.interCI(2))]; %#ok<AGROW>
|
||||
|
||||
rawSummaries = [rawSummaries tdcs_model_summary(lme, ...
|
||||
sprintf('phase %d-%d: success ~ dayp*tDCS + (1|subject)', ph(1), ph(2))) ...
|
||||
sprintf('\n')]; %#ok<AGROW>
|
||||
end
|
||||
|
||||
s = [s sprintf(['\nNote: the interaction p (and CI) use fitlme observation-level DF and are\n' ...
|
||||
'ANTICONSERVATIVE at these small subject counts (see tdcs_power_sim). The early\n' ...
|
||||
'phase carries the Box-B2 faster-acquisition signal; late phases converge.\n'])];
|
||||
|
||||
s = [s rawSummaries];
|
||||
|
||||
fprintf('%s', s);
|
||||
localWrite(['phase_' mergeKey], s);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user