Package: Spower 0.6.4

Spower: Power Analyses using Monte Carlo Simulations

Provides a general purpose simulation-based power analysis API for routine and customized simulation experimental designs. The package focuses exclusively on Monte Carlo simulation experiment variants of (expected) prospective power analyses, criterion analyses, compromise analyses, sensitivity analyses, and a priori/post-hoc analyses. The default simulation experiment functions defined within the package provide stochastic variants of the power analysis subroutines in G*Power 3.1 (Faul, Erdfelder, Buchner, and Lang, 2009) <doi:10.3758/brm.41.4.1149>, along with various other parametric and non-parametric power analysis applications (e.g., mediation analyses) and support for Bayesian power analysis by way of Bayes factors or posterior probability evaluations. Additional functions for building empirical power curves, reanalyzing simulation information, and for increasing the precision of the resulting power estimates are also included, each of which utilize similar API structures. For further details see the associated publication in Chalmers (2025) <doi:10.3758/s13428-025-02787-z>.

Authors:Phil Chalmers [aut, cre]

Spower_0.6.4.tar.gz
Spower_0.6.4.zip(r-4.7)Spower_0.6.4.zip(r-4.6)Spower_0.6.4.zip(r-4.5)
Spower_0.6.4.tgz(r-4.6-any)Spower_0.6.4.tgz(r-4.5-any)
Spower_0.6.4.tar.gz(r-4.7-any)Spower_0.6.4.tar.gz(r-4.6-any)
Spower_0.6.4.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
Spower/json (API)

# Install 'Spower' in R:
install.packages('Spower', repos = c('https://philchalmers.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/philchalmers/spower/issues

Pkgdown/docs site:https://philchalmers.github.io

On CRAN:

Conda:

6.56 score 4 stars 18 scripts 605 downloads 40 exports 150 dependencies

Last updated from:f45e46102d. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK199
source / vignettesOK267
linux-release-x86_64OK192
macos-release-arm64OK115
macos-oldrel-arm64OK98
windows-develOK130
windows-releaseOK126
windows-oldrelOK185
wasm-releaseOK186

Exports:gen_2rgen_anova.testgen_chisq.testgen_glmgen_kruskal.testgen_mauchly.testgen_mcnemar.testgen_mediationgen_prop.testgen_rgen_slrgen_t.testgen_var.testgetLastSpowerintervalis.CI_withinis.outside_CImauchlys.testp_2rp_anova.testp_chisq.testp_glmp_kruskal.testp_ks.testp_lm.R2p_mauchly.testp_mcnemar.testp_mediationp_prop.testp_rp_r.catp_scalep_shapiro.testp_slrp_t.testp_var.testp_wilcox.testSpowerSpowerBatchSpowerCurve

Dependencies:abindadmiscaskpassaudiobackportsbase64encbeeprbootbriobroombslibcachemcallrcarcarDataclassclicliprcocorcodetoolscolorspacecowplotcpp11crayoncrosstalkcurldata.tableDerivdescdiffobjdigestdoBydplyre1071EnvStatsevaluatefarverfastmapfontawesomeforecastFormulafracdifffsfuturefuture.applygenericsggplot2globalsgluegtablehighrhtmltoolshtmlwidgetshttrisobandjquerylibjsonliteknitrlabelinglaterlatticelavaanlazyevallifecyclelistenvlme4lmtestmagrittrMASSMatrixMatrixModelsmemoisemgcvmicrobenchmarkmimeminqamiraimnormtmodelrmvtnormnanonextnlmenloptrnnetnortestnumDerivopensslotelparallellypbapplypbivnormpbkrtestpillarpkgbuildpkgconfigpkgloadplotlypolycorpraiseprocessxprogressrpromisesproxypspurrrqs2quadprogquantregR.methodsS3R.ooR.utilsR6rappdirsrbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRcppParallelRdpackreformulasrlangrmarkdownrprojrootS7sassscalessessioninfoSimDesignSparseMstringfishstringistringrsurvivalsystestthattibbletidyrtidyselecttimeDatetinytexurcautf8vctrsviridisLitewaldowithrxfunyamlzoo

Introduction to the Spower package
Types of functions | Built-in simulation experiments | User-defined simulation experiments | Types of power analyses to evaluate | Prospective/post-hoc power analysis | Compromise power analysis | A priori power analysis | Sensitivity power analysis | Criterion power analysis | Multiple power evaluation functions | SpowerBatch() | SpowerCurve()

Last update: 2026-06-12
Started: 2025-07-31

G*Power examples evaluated with Spower
Correlation | Example 3.3; Difference from constant (one sample case) | Test against constant $\rho_0=0$ | Example 27.3; Correlation - inequality of two independent Pearson r's | Example 28.3.1; Correlation - inequality of two dependent Pearson r's (no common index) | Example 28.3.2; Correlation - inequality of two dependent Pearson r's (common index) | Example 28.3.3; sensitivity analysis | Example 16.3; Point-biserial correlation | Example 31.3; tetrachoric correlation | Proportions | Example 4.3; One sample proportion tests | Example 22.1; Wilcoxon signed-rank test | Laplace($\mu$, 1) version | Example 5.3; Two dependent proportions test (McNemar's test) | Multiple Linear Regression (Fixed IVs) | Example 13.1 | Example 14.3 | Example 14.3b | Multiple Linear Regression (Random IVs) | Example 7.3 | Simple linear regression | Example 12.3 | Fixed effects ANOVA - One way (F-test) | Example 10.3 | $t$-test: Linear regression (two groups) | Example 17.3 and 18.3 | Variance tests | Example 26.3; Difference from constant (one sample case) | Example 15.3; Two-sample variance test | t-tests | Example 19.3; Paired samples t-test | Example 20.3; One-sample t-test | Wilcoxon tests | Example 22.3; One-sample test with normal distribution | Two-sample test with Laplace distributions | Example 23.3: Paired-samples test with Laplace distributions

Last update: 2026-06-12
Started: 2024-10-24

Conditional Power Analyses via Type M and Type S errors
Type S errors via simulation | Manual specification | Implementation using built-in p_t.test() function | Type M errors via simulation

Last update: 2026-06-10
Started: 2025-10-14

Logical Vectors, Bayesian power analyses, and ROPEs
Logical returns | Confidence (and credible) intervals | Using previouls defined simulation code | Precision criterion | Bayes Factors | Bayesian power analysis via posterior probabiltes | Regions of practical equivalence (ROPEs) | Equivalence testing | Bayesian approach to ROPEs (HDI + ROPE)

Last update: 2026-05-06
Started: 2025-09-03

Readme and manuals

Help Manual

Help pageTopics
Get previously evaluated Spower executiongetLastSpower
Evaluate whether a confidence interval is within a tolerable intervalis.CI_within
Evaluate whether parameter is outside a given confidence intervalis.outside_CI
p-value from comparing two or more correlations simulationgen_2r p_2r
p-value from one-way ANOVA simulationgen_anova.test p_anova.test
p-value from chi-squared test simulationgen_chisq.test p_chisq.test
p-value from (generalized) linear regression model simulations with fixed predictorsgen_glm p_glm
p-value from Kruskal-Wallis Rank Sum Test simulationgen_kruskal.test p_kruskal.test
p-value from Kolmogorov-Smirnov one- or two-sample simulationp_ks.test
p-value from global linear regression model simulationp_lm.R2
p-value from Mauchly's Test of Sphericity simulationgen_mauchly.test mauchlys.test p_mauchly.test
p-value from McNemar test simulationgen_mcnemar.test p_mcnemar.test
p-value from three-variable mediation analysis simulationgen_mediation p_mediation
p-value from proportion test simulationgen_prop.test p_prop.test
p-value from correlation simulationgen_r p_r
p-value from tetrachoric/polychoric or polyserialp_r.cat
p-value from Scale Test simulationp_scale
p-value from Shapiro-Wilk Normality Test simulationp_shapiro.test
p-value from simple linear regression model simulationgen_slr p_slr
p-value from independent/paired samples t-test simulationgen_t.test p_t.test
p-value from variance test simulationgen_var.test p_var.test
p-value from Wilcoxon (signed rank) test simulationp_wilcox.test
Simulation-based Power Analysesas.data.frame.Spower as.data.frame.SpowerBatch interval print.Spower print.SpowerBatch Spower SpowerBatch SpowerCurve
Update compromise or prospective/post-hoc power analysis without re-simulatingupdate.Spower