diff --git a/docs/models/_partials/_results_factors.qmd b/docs/models/_partials/_results_factors.qmd index 9ef1d68b..6c14d733 100644 --- a/docs/models/_partials/_results_factors.qmd +++ b/docs/models/_partials/_results_factors.qmd @@ -221,6 +221,36 @@ if factor_summary is not None and "role" in factor_summary.columns: print("\n:::") ``` +```{python} +# | echo: false +# | output: asis +# SP / RW baseline-timing note (#389 finding 5). Speech accuracy (deapp_c) and +# phonological memory (erbto) are read at the child's BASELINE (t1) value so the +# randomised contrast is not conditioned on a treatment-affected descendant (#247 +# timing); their coefficients are therefore baseline-predictor associations, not +# contemporaneous per-wave factors. Term-gated, so it prints only where such an +# adjuster is actually in the summary (and stays silent for models without one). +if factor_summary is not None and "term" in factor_summary.columns: + _terms = set(factor_summary["term"].astype(str)) + _baseline_adj = { + "gamma_deapp_c": "speech accuracy", + "gamma_erbto": "phonological memory (nonword repetition)", + } + _present = [lbl for t, lbl in _baseline_adj.items() if t in _terms] + if _present: + _names = " and ".join(_present) + _plural = len(_present) > 1 + print( + f"\n_Timing of the {_names} adjuster{'s' if _plural else ''}:_ read at " + f"the child's **baseline (t1)** value — so the randomised contrast is not " + f"conditioned on a treatment-affected descendant of the intervention " + f"(#247 timing) — {'these are' if _plural else 'so this is'} a " + f"**baseline-predictor association** applied across all of a child's " + f"observations, **not** a contemporaneous per-wave factor. Hearing, being " + f"exogenous, is read contemporaneously instead." + ) +``` + ```{python} # | echo: false # | output: asis