Repository navigation
solomonR 0.4.0
solomonR 0.4.0
solomonR 0.4.0 adds validated power and sample-size planning, figures designed for the Solomon four-group design, and a single index of the package's simulation evidence.
Highlights
Power and sample-size planning
power_solomon()is rebuilt and validated (#18).- For each Solomon test it reports the rejection rate with its Monte Carlo standard error.
- Every row names the estimand and the true effect behind it.
- New
alphaandseedarguments. - A pre-specified simulation study (126 scenarios, 315,000 replications) found:
- exact agreement with the analytic benchmark for the 2x2 ANOVA interaction;
- nominal size for Test I under the complete null;
- no fit failures.
- GLM-based rates are conservative with 20 or fewer participants per cell, following the HC3 standard errors used by default.
- New
plan_solomon()(#24). It finds the smallest design, at a chosen allocation across the four cells, whose power reaches a target for each estimand.- It works analytically, returning the exact minimum, or by simulating the package's own GLM test.
- The help page shows that the sensitization contrast has four times the sampling variance of the average treatment effect, so detecting sensitization as large as the average effect needs about four times as many participants.
Figures
| Function | Issue | What it shows |
|---|---|---|
plot_solomon_design() |
#25 | The design in Campbell and Stanley's notation, labeled with group sizes and posttest means, with empty or sparse groups flagged |
plot_sensitization() |
#26 | Model-adjusted group means whose interaction equals the fitted sensitization contrast exactly, with observed means for comparison |
plot_solomon_effects() |
#27 | A forest plot of the four Solomon contrasts, stating the confidence level and reference distribution |
plot_solomon_change() |
#28 | Pretest-to-posttest change for the pretested groups, with the unpretested groups labeled as posttest-only by design |
plot_classic_flow() |
#29 | The historical Tests A-I decision path, highlighting a fitted analysis's route, with its Type I error caution |
plot_power_solomon() |
#30 | Power curves by estimand, marking the designs plan_solomon() returns |
Evidence
- New article: "Validation Evidence" (#11). It gathers the package's simulation studies, with each study's protocol, scenarios, replications, failed fits, and results against its pre-registered tolerances.
- Shared tables.
studies.csvandbenchmarks.csvare rebuilt from each study's committed results and can be downloaded from the repository.
Changes that can alter results
power_solomon()returns a new data frame.- The columns
estimand,test,true_effect,power,mcse,sims,failures, andalphareplace the formermetricandpower. - The experimental warning is removed.
- The columns
- Wider cell-mean intervals in two plots.
plot_solomon()andplot_solomon_gg()now use t intervals with n - 1 degrees of freedom for cell means instead of the normal quantile, so the intervals are slightly wider with small cells.
Checks
R CMD check: 0 errors, 0 warnings, 0 notes on Windows, macOS, and Ubuntu (R release, oldrel-1, and devel; devel also with--as-cran).- Check run: https://github.com/JUhalt/solomonR/actions/runs/36130773705
- pkgdown site: https://juhalt.github.io/solomonR/
Installation
install.packages(
"solomonR",
repos = c(
JUhalt = "https://juhalt.r-universe.dev",
CRAN = "https://cloud.r-project.org"
)
)or
pak::pak("JUhalt/solomonR@v0.4.0")Not in this release
plot_sensitization()forfit_solomon_ml()fits. The ML small-sample degrees-of-freedom computation must be exposed first.- Binary and count outcomes, clustered and longitudinal designs, and cluster-level randomization inference (#19). These are planned for v0.5.0.