Skip to content

Make Satterthwaite the default inference of fit_solomon_ml() (#115) - #124

Merged
JUhalt merged 8 commits into
masterfrom
fix/115-ml-satterthwaite
Oct 4, 2026
Merged

JUhalt merged 8 commits into
masterfrom
fix/115-ml-satterthwaite

Conversation

@JUhalt

@JUhalt JUhalt commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Fixes #115, as the maintainer decided on October 3, 2026.

  • Default. fit_solomon_ml(inference = "satterthwaite") is now the default (Satterthwaite, 1946; Welch, 1947). "wald" remains, labelled as van Engelenburg's (1999) large-sample inference. The package's own study found the Wald default liberal (coverage .920 at 10 per cell), while the Satterthwaite option was calibrated ([v0.3] Broaden fit_solomon_ml simulation validation #10, [Proposal] Small-sample inference for fit_solomon_ml() #22).
  • Warning. The below-40-per-cell warning that recommended Satterthwaite is removed, since it is now the default.
  • Updated to match: every caller (compare_solomon_methods(), plot_sensitization(), the report_solomon() text), the vignettes, the README, the validation article, and the roadmap. NEWS calls this a change of default that can alter results.
  • Printout (fixed after review). It labels each residual SD as the ML or the unbiased value, so the printed SD reproduces the printed SE. The fit stores the latter as sigma_unbiased.
  • Captions of plot_solomon_effects() and plot_sensitization() put the inference on a line of its own, so the longer cited label fits a 7-inch figure. Tests check every line fits.

Checks

  • Full test suite: 2,900 expectations, 0 failures.
  • tools/check-references.R and the spelling check are clean.

Review. An independent reviewer checked the branch against the issues' acceptance criteria and re-ran its statistics. Every confirmed finding was then fixed, with tests.

References

Satterthwaite, F. E. (1946). An approximate distribution of estimates of variance components. Biometrics Bulletin, 2(6), 110–114. https://doi.org/10.2307/3002019

van Engelenburg, G. (1999). Statistical analysis for the Solomon four-group design (Research Report 99-06). University of Twente. ERIC. https://eric.ed.gov/?id=ED435692

Welch, B. L. (1947). The generalization of "Student's" problem when several different population variances are involved. Biometrika, 34(1–2), 28–35. https://doi.org/10.1093/biomet/34.1-2.28

🤖 Generated with Claude Code

JUhalt and others added 4 commits October 3, 2026 22:56
fit_solomon_ml() now defaults to inference = "satterthwaite". Point
estimates are unchanged; standard errors, intervals, and p-values change
for code that relied on the old default, which can reproduce earlier
results with inference = "wald". "wald" remains, documented as van
Engelenburg's (1999) large-sample inference. The package's simulation
study (#10, #22) found Wald intervals liberal in small samples (mean
coverage .920 at 10 per cell) and Satterthwaite inference calibrated at
every cell size studied.

- The classed small-sample warning (solomonR_small_sample_warning) is
  removed. It recommended what is now the default and was silent whenever
  "wald" was chosen explicitly, now the only way to get Wald inference.
  The printed note for Wald fits with fewer than 40 per cell stays and now
  states the threshold.
- compare_solomon_methods() lists "Maximum likelihood (Satterthwaite)"
  first and "Maximum likelihood (Wald)"; the rows were "Maximum likelihood
  (small-sample)" and "Maximum likelihood".
- equivalence_solomon() labelled every ML fit "large-sample normal
  reference", even Satterthwaite fits tested with t; it now uses the fit's
  inference, through a shared .ml_inference_label() also used by figure
  captions.
- Printed output, captions, and report_solomon() say "Satterthwaite
  inference" instead of "the small-sample option"; report_solomon() states
  which contrasts use residual and which Welch-Satterthwaite df, and calls
  Wald tests large-sample.

Tests: existing expectations changed because the behavior was changed on
purpose, not because they were wrong before:
- test-ml-inference.R: "small cells warn only when inference is not
  chosen" and "cells at the threshold do not warn" are replaced by a test
  that no inference choice warns; the print test now expects
  "Inference: Satterthwaite" (was "Inference: small-sample").
- test-plot-effects.R and test-plot-sensitization.R expect the caption
  "maximum likelihood; Satterthwaite inference" (was "small-sample option").
- test-compare.R selects rows by the new ML labels.
New tests cover the default, the absence of the warning, the printed note
at and below the threshold, the report text and references for both
options, the equivalence label and df for Satterthwaite fits, and the
order and values of the two ML rows in compare_solomon_methods().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…les (#115)

- Getting-started guide: the default ML fit is printed, and Wald
  inference is shown as inference = "wald" with its small-cell note; the
  table of analyses no longer says to choose "satterthwaite" for small
  groups.
- Method guide, GLM vignette, README (re-knitted), and the several-
  treatments article describe Satterthwaite inference as the default and
  Wald inference as van Engelenburg's (1999) large-sample option, with
  Satterthwaite (1946) and Welch (1947) cited and listed where they are
  named.
- ml-validation article: notes that the run predates the change and named
  every fit's inference, so its results stand; renames the warning
  threshold as the small-cell threshold for Wald inference; shows the
  methods as "ML, Satterthwaite (default)" and "ML, Wald (van Engelenburg,
  1999)" while performance.csv keeps the run's labels.
- validation-evidence: build-benchmarks.R applies the same labels;
  benchmarks.csv and studies.csv are regenerated (only the ML method labels
  change; an unmodified rebuild reproduced the committed files exactly).
- References page: the van Engelenburg (1999) note records the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-up for #115.

- The Satterthwaite label of .ml_inference_label() and the print header
  of fit_solomon_ml() now cite (Satterthwaite, 1946; Welch, 1947), as the
  Wald label cites van Engelenburg (1999). equivalence_solomon() wraps
  the longer label to the console width.
- With the citation, a caption line of plot_solomon_effects() and
  plot_sensitization() reached 140 characters and was cut off at 7 inches.
  The inference now has a line of its own, after the confidence level and
  reference distribution; tests check that every caption line fits 92
  characters, the count for a 7-inch figure at 0.55 em per character.
- The printout labels the residual SDs as ML estimates (SSE / n) and, for
  Satterthwaite fits, also gives the SDs from the unbiased variances
  (SSE / df) that its SEs use, stored in the new sigma_unbiased field.
  Tests tie each printed SD to the printed SE it produces.
- ?compare_solomon_methods lists Satterthwaite (1946) and Welch (1947),
  and ?plot_solomon_effects lists them and van Engelenburg (1999), since
  their output cites these works; a test checks the help pages.

Changed expectations: test-ml-inference.R, test-plot-effects.R, and
test-plot-sensitization.R expected the Satterthwaite label without its
sources, which the label now carries on purpose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
List #115 among the v1.0.0 requirements, and note on the #22 item that
the option became the default and its small-sample warning was removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JUhalt JUhalt added this to the v1.0.0 milestone Oct 4, 2026
This was referenced Oct 4, 2026
JUhalt and others added 4 commits October 4, 2026 07:19
NEWS: this branch's sections go under the development heading, above
the 0.8.1 section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R/solomon_plot_effects.R: the ML entry keeps this branch's cited
inference label and gains master's bounds scale; the references are the
union, in order; the caption keeps the inference on its own line and
names the thin bars when bounds are drawn. The TOST outcome now goes on
a line of its own, as it does for designs with several treatments, so
every caption line fits a 7-inch figure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NEWS: this branch's section goes first under the development heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NEWS: this branch's section goes first under the development heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JUhalt
JUhalt merged commit fd1267a into master Oct 4, 2026
9 checks passed
JUhalt added a commit that referenced this pull request Oct 4, 2026
NEWS: this branch's sections go first under the development heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[v1.0] Make Satterthwaite the default inference of fit_solomon_ml()

1 participant