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:
@@ -87,7 +87,9 @@ s = [s localCleanDisp(R.countGLME) sprintf('\n')];
|
||||
s = [s localHeader('(B) LEVEL / RATE -- Binomial GLMM (subject random intercept)')];
|
||||
s = [s localCleanDisp(R.rateGLME) sprintf('\n')];
|
||||
|
||||
s = [s localHeader('(C) LEARNING RATE -- per-animal slope test (Box-B2 vs Box-A2)')];
|
||||
s = [s localHeader('(C) LEARNING RATE -- Poisson GLMM (group x day interaction)')];
|
||||
s = [s localCleanDisp(R.learnGLME) sprintf('\n')];
|
||||
s = [s sprintf('Per-animal OLS slope test (Box-B2 vs Box-A2), cluster-honest:\n')];
|
||||
if R.learn.slopeMWUp < 0.05
|
||||
verdict = 'DIFFERENT learning rates';
|
||||
else
|
||||
@@ -103,12 +105,11 @@ s = [s sprintf(['(Reference only: the GLMM group x day_c joint F-test gives p=%.
|
||||
end
|
||||
|
||||
function s = localCleanDisp(model)
|
||||
%LOCALCLEANDISP disp(MODEL) captured to text, with the Command-Window-only
|
||||
% <strong>...</strong> bold-markup tags (rendered by the interactive
|
||||
% MATLAB terminal, but emitted as literal text by EVALC) stripped so the
|
||||
% report/console/file output is plain text.
|
||||
raw = evalc('disp(model)');
|
||||
s = regexprep(raw, '</?strong>', '');
|
||||
%LOCALCLEANDISP Full native model summary (disp(MODEL)) as plain text.
|
||||
% Thin wrapper over the shared TDCS_MODEL_SUMMARY so the count, rate, and
|
||||
% learning GLMMs here render the same verbatim summary used by the LME
|
||||
% reports.
|
||||
s = tdcs_model_summary(model);
|
||||
end
|
||||
|
||||
% ------------------------------------------------------------ interpretation
|
||||
|
||||
Reference in New Issue
Block a user