Package: powerutilities 0.7.1

powerutilities: Power Analysis for Linear and Generalized Linear Mixed Models

Prospective power analysis and design planning using the "plug-in" approach described by Piepho et al. (2022) <doi:10.1017/S0021859622000466> and Stroup, Ptukhina and Garai (2024) <doi:10.1201/9780429092060-24>. Expected treatment means and the proposed experimental design are encoded in an artificial data set, and a model is "fit" to it with random effect variances, correlations and residual dispersion fixed at user-specified values rather than being estimated. The resulting standard errors are used to compute the power of F-tests and user-defined contrasts, as well as Type S (sign) and Type M (magnitude) error rates (Gelman and Carlin, 2014 <doi:10.1177/1745691614551642>). Models are fit with 'glmmTMB', so the approach accommodates non-normal responses, heteroscedasticity, nested and crossed random effects, correlated random slopes, and structured covariances such as AR(1) and spatial correlation. Helper functions convert standard deviations and correlations into the internal parameterization of 'glmmTMB' and report the order in which random effect parameters must be supplied. Denominator degrees of freedom can be computed by the Kenward-Roger, residual or asymptotic methods (or can be specified by users), and contrasts are specified through 'emmeans'. Vignettes cover estimated marginal means, contrast specification, and worked examples for common agricultural designs.

Authors:Simon Riley [aut, cre]

powerutilities_0.7.1.tar.gz
powerutilities_0.7.1.zip(r-4.7-any)powerutilities_0.7.1.zip(r-4.6-any)powerutilities_0.7.1.zip(r-4.5-any)
powerutilities_0.7.1.tgz(r-4.6-any)powerutilities_0.7.1.tgz(r-4.5-any)
powerutilities_0.7.1.tar.gz(r-4.7-any)powerutilities_0.7.1.tar.gz(r-4.6-any)
powerutilities_0.7.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
powerutilities/json (API)

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

Bug tracker:https://github.com/simonshamusriley/powerutilities/issues

Datasets:
  • barley - Effect of Nitrolime and Superphosphate on Barley Yields
  • greenfeeds - Fodder Beet Yields

On CRAN:

Conda:

5.26 score 5 exports 68 dependencies

Last updated from:1cc2ac9734. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK171
source / vignettesOK440
linux-releaseOK170
macos-releaseOK242
macos-oldrelOK242
windows-develOK83
windows-releaseOK113
windows-oldrelOK101
wasm-releaseOK104

Exports:extract_disppower_contrastpower_ftestset_glmmtheta_finder

Dependencies:backportsbootbroomclicolorspacecowplotcpp11DerivdoBydplyremmeansestimabilityfarverforecastfracdiffgenericsggplot2glmmTMBgluegtableisobandlabelinglatticelifecyclelme4lmtestmagrittrMASSMatrixmgcvminqamodelrmvtnormnlmenloptrnnetnumDerivpbkrtestpillarpkgconfigpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasretrodesignrlangRTMBS7sandwichscalesstringistringrtibbletidyrtidyselecttimeDateTMBurcautf8vctrsviridisLitewithrzoo

Specifying Contrasts in R
Introduction | Estimated Marginal Means

Last update: 2026-10-13
Started: 2025-12-19

Power and Planning for Generalized Linear Mixed Models
Introduction | Housekeeping | Example 1: A Randomized Complete Block Design and Binomial Data

Last update: 2026-09-30
Started: 2025-12-17

Introduction to the "Plug-In" Method of Power Analysis in R
Introduction | Housekeeping | Example 1: A two-sample t-test | Example 2: A Split-Plot Randomized Complete Block Design | Example 3: A Study for Estimating and Comparing Trends

Last update: 2026-09-29
Started: 2025-12-19