Package: mixpower 1.1.1

Alex Litovchenko

mixpower: Simulation-Based Power Analysis for Mixed-Effects Models

A comprehensive, simulation-based toolkit for power and sample-size analysis for linear and generalized linear mixed-effects models (LMMs and GLMMs). Supports Gaussian, binomial, Poisson, and negative binomial families via 'lme4'; Wald and likelihood-ratio tests; multi-parameter sensitivity grids; power curves and minimum sample-size solvers; parallel evaluation with deterministic seeds; and full reproducibility (manifests, result bundling, and export to CSV/JSON). Delivers thorough diagnostics per run (failure rate, singular-fit rate, effective N) and publication-ready summary tables. References: Bates et al. (2015) "Fitting Linear Mixed-Effects Models Using lme4" <doi:10.18637/jss.v067.i01>; Green and MacLeod (2016) "SIMR: an R package for power analysis of generalized linear mixed models by simulation" <doi:10.1111/2041-210X.12504>.

Authors:Alex Litovchenko [aut, cre]

mixpower_1.1.1.tar.gz
mixpower_1.1.1.zip(r-4.7)mixpower_1.1.1.zip(r-4.6)mixpower_1.1.1.zip(r-4.5)
mixpower_1.1.1.tgz(r-4.6-any)mixpower_1.1.1.tgz(r-4.5-any)
mixpower_1.1.1.tar.gz(r-4.7-any)mixpower_1.1.1.tar.gz(r-4.6-any)
mixpower_1.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
mixpower/json (API)
NEWS

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

Bug tracker:https://github.com/alitovchenko/mixpower/issues

On CRAN:

Conda:

5.38 score 9 scripts 204 downloads 58 exports 14 dependencies

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

TargetResultTimeFilesSyslog
linux-devel-x86_64OK199
source / vignettesOK264
linux-release-x86_64OK154
macos-release-arm64OK103
macos-oldrel-arm64OK101
windows-develOK151
windows-releaseOK122
windows-oldrelOK97
wasm-releaseOK113

Exports:fit_modelmp_assumptionsmp_backendmp_backend_glmmtmbmp_backend_lme4mp_backend_lme4_binomialmp_backend_lme4_nbmp_backend_lme4_poissonmp_beta_to_dmp_beta_to_r2mp_bundle_resultsmp_calibratemp_compare_modelsmp_d_to_betamp_designmp_extendmp_f_to_betamp_from_fitmp_grid_sample_sizemp_icc_to_sdmp_logodds_to_ormp_manifestmp_methods_textmp_missingmp_or_to_logoddsmp_parallel_clustermp_powermp_power_checkpointmp_power_curvemp_power_curve_parallelmp_quick_powermp_r2_to_betamp_recommend_methodmp_report_tablemp_safeguard_effectmp_scenariomp_scenario_glmmtmb_lmmmp_scenario_lme4mp_scenario_lme4_binomialmp_scenario_lme4_nbmp_scenario_lme4_poissonmp_sd_to_iccmp_sensitivitymp_sensitivity_cell_runmp_sensitivity_parallelmp_sesoimp_solve_sample_sizemp_t_to_betamp_write_resultsplot_powerrun_parallelsimulate_glmm_binomial_datasimulate_glmm_nb_datasimulate_glmm_poisson_datasimulate_powersummarize_simulationstest_effectvalidate_mp_backend

Dependencies:bootlatticelme4MASSMatrixminqanlmenloptrrbibutilsRcppRcppEigenRdpackreformulasrlang

Designing studies

Rendered frommixpower-design.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-13
Started: 2026-02-02

Diagnostics and sensitivity

Rendered frommixpower-diagnostics.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-13
Started: 2026-02-02

Effect sizes: maximal models, fitted pilots, and safeguard power

Rendered frommixpower-effect-sizes.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-17

Extending mixpower with custom backends

Rendered frommixpower-extending.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-04-18

mixpower intro

Rendered frommixpower-intro.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-02-02

Reproducibility workflow

Rendered frommixpower-reproducibility.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-04-18

Running simulations

Rendered frommixpower-simulations.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-13
Started: 2026-02-02

Validation: is your power number trustworthy?

Rendered frommixpower-validation.Rmdusingknitr::rmarkdownon Jun 18 2026.

Last update: 2026-06-18
Started: 2026-06-17

Readme and manuals

Help Manual

Help pageTopics
Simulation-Based Power Analysis for Mixed-Effects Modelsmixpower-package mixpower
Coerce mixpower results to a tibbleas_tibble.mp_power
ggplot2 diagnostic plot for sensitivity or power curveautoplot.mp_sensitivity
Effect-size converters for eliciting assumptionseffect_size mp_beta_to_d mp_beta_to_r2 mp_d_to_beta mp_f_to_beta mp_icc_to_sd mp_logodds_to_or mp_or_to_logodds mp_r2_to_beta mp_sd_to_icc mp_t_to_beta
Fit a model for a single simulated datasetfit_model
Create modeling assumptions for simulation-based powermp_assumptions
MixPower backend contractmp_backend
Build a glmmTMB backend for Gaussian LMM scenariosmp_backend_glmmtmb
Build an lme4 backend for MixPower scenariosmp_backend_lme4
Build an lme4 backend for binomial GLMM scenariosmp_backend_lme4_binomial
Build an lme4 backend for Negative Binomial GLMM scenariosmp_backend_lme4_nb
Build an lme4 backend for Poisson GLMM scenariosmp_backend_lme4_poisson
Bundle results with manifest and optional labelsmp_bundle_results
Check the Type I error calibration of a scenario's testmp_calibrate
Compare analysis models on the same simulated datamp_compare_models
Create a study design specificationmp_design
Scale a fitted-model scenario's sample size up or downmp_extend
Build a power scenario from a fitted lme4 modelmp_from_fit
Create a grid of values for sample-size searchmp_grid_sample_size
Reproducibility manifest for power analysesmp_manifest
Generate a methods paragraph for a power analysismp_methods_text
Add a missing-data / dropout mechanism to a scenariomp_missing
Simulation-based power estimation (engine-agnostic core)mp_power
Resumable, checkpointed power simulationmp_power_checkpoint
Power curve for a single design/assumption parametermp_power_curve
Parallel power curve evaluationmp_power_curve_parallel
Quick power run for a single LMM designmp_quick_power
Recommend an inference method for a scenariomp_recommend_method
Publication-ready summary table for power resultsmp_report_table
Safeguard (confidence-bound) effect size from a fitted modelmp_safeguard_effect
Create a power-analysis scenariomp_scenario
Gaussian LMM scenario using glmmTMBmp_scenario_glmmtmb_lmm
Create a fully specified MixPower scenario with the lme4 backendmp_scenario_lme4
Create a fully specified MixPower scenario with the binomial lme4 backendmp_scenario_lme4_binomial
Create a fully specified MixPower scenario with the NB lme4 backendmp_scenario_lme4_nb
Create a fully specified MixPower scenario with the Poisson lme4 backendmp_scenario_lme4_poisson
Run power sensitivity analysis over a parameter gridmp_sensitivity
Parallel sensitivity analysis over a parameter gridmp_sensitivity_parallel
Set a smallest effect size of interest (SESOI) on a scenariomp_sesoi
Solve for minimum sample size achieving target powermp_solve_sample_size
Write results or bundle to CSV or JSONmp_write_results
Plot power resultsplot_power
Plot the p-value distribution of a power analysisplot.mp_power
Plot a power curveplot.mp_power_curve
Plot a sensitivity analysisplot.mp_sensitivity
Placeholder for parallel executionrun_parallel
Simulate binary outcome data for a GLMM with random effectssimulate_glmm_binomial_data
Simulate count outcome data for a Negative Binomial GLMM with random effectssimulate_glmm_nb_data
Simulate count outcome data for a Poisson GLMM with random effectssimulate_glmm_poisson_data
Run a simple simulation-based power studysimulate_power
Summarize simulation outputssummarize_simulations
Extract a test statistic for a model termtest_effect
Validate a MixPower backendvalidate_mp_backend