Package: powerutilities Title: Power Analysis for Linear and Generalized Linear Mixed Models Description: Prospective power analysis and design planning using the "plug-in" approach described by Piepho et al. (2022) and Stroup, Ptukhina and Garai (2024) . 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 ). 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. Version: 0.7.1 Authors@R: person("Simon", "Riley", email = "ssriley@protonmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4833-2026")) Depends: R (>= 4.1.0) Imports: dplyr, emmeans, glmmTMB (>= 1.1.14), pbkrtest, reformulas,retrodesign, rlang Suggests: agridat, knitr, rmarkdown, testthat (>= 3.0.0), tidyr License: BSD_3_clause + file LICENSE URL: https://github.com/SimonShamusRiley/powerutilities/tree/main BugReports: https://github.com/SimonShamusRiley/powerutilities/issues Encoding: UTF-8 Roxygen: list(markdown = TRUE) VignetteBuilder: knitr LazyData: true Config/roxygen2/version: 8.1.0 Config/testthat/edition: 3 Config/pak/sysreqs: cmake make libicu-dev Repository: https://simonshamusriley.r-universe.dev Date/Publication: 2026-10-13 08:13:06 UTC RemoteUrl: https://github.com/simonshamusriley/powerutilities RemoteRef: HEAD RemoteSha: 1cc2ac973428ccb02fb5e07cfa275a0326813e95 NeedsCompilation: no Packaged: 2026-10-22 10:18:10 UTC; root Author: Simon Riley [aut, cre] (ORCID: ) Maintainer: Simon Riley