docs(level-factors): name SP/RW adjusters as baseline-predictor associations (#389 finding 5) - #447
Open
ethanbuckley wants to merge 1 commit into
Open
docs(level-factors): name SP/RW adjusters as baseline-predictor associations (#389 finding 5)#447ethanbuckley wants to merge 1 commit into
ethanbuckley wants to merge 1 commit into
Conversation
…ssociations (#389 finding 5) In the factor families the speech-accuracy (deapp_c) and phonological-memory (erbto) adjusters 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 -- a distinction the level report did not state. Add a term-gated note to the shared _results_factors.qmd (rendered by the gain and level families) that names these adjusters as baseline predictors wherever they appear in the factor summary, and stays silent for models without them. Correct for both families (both baseline-time SP/RW per #247); no other report changes. Addresses #389 finding 5. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Clarifies how the factor-family reports should interpret the speech-accuracy (deapp_c) and phonological-memory (erbto) adjusters by explicitly stating they are baseline (t1) predictor associations (to avoid post-treatment adjustment) rather than contemporaneous per-wave factors, and only emitting the note when those terms actually appear in factor_summary.csv.
Changes:
- Add an
output: asisQuarto Python block that detectsgamma_deapp_c/gamma_erbtoinfactor_summaryand prints a timing/interpretation note. - Keep the note term-gated so reports without these adjusters remain byte-identical.
Comment on lines
+233
to
+251
| 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." | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Drafted by an LLM-based AI tool (Claude Code/Opus 4.8).
Third tranche of #389 — finding 5, an independent doc change off
main(touches only_results_factors.qmd, which #445/#446 don't modify, so it can merge in any order).The issue
In the factor families the speech-accuracy (
deapp_c) and phonological-memory (erbto) adjusters are read at the child's baseline (t1) value — deliberately, so the randomised contrast is not conditioned on a treatment-affected descendant of the intervention (#247 timing). Their coefficients are therefore baseline-predictor associations, not contemporaneous per-wave factors, and the level report didn't say so.The change
A single term-gated note in the shared
_results_factors.qmd(rendered by the gain and level families), placed just after the "Adjusted associations — not causal" callout. It names the speech-accuracy / phonological-memory adjusters as baseline predictors only where they actually appear in the factor summary, and stays silent for models without them — so reports that carry no such adjuster are byte-identical.Correct for both families (both baseline-time SP/RW per #247), so it's a faithful clarification, not a level-only quirk bolted onto a shared partial.
Verification
output: asisblock's logic checked standalone for the both / one / none cases (prints only when a flagged term is present);npm run format:checkandnpm run spellcheckclean;#389 status
Assigning to a human for review and merge.