Package: mixpower 1.2.0

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.2.0.tar.gz
mixpower_1.2.0.zip(r-4.7-any)mixpower_1.2.0.zip(r-4.6-any)mixpower_1.2.0.zip(r-4.5-any)
mixpower_1.2.0.tgz(r-4.6-any)mixpower_1.2.0.tgz(r-4.5-any)
mixpower_1.2.0.tar.gz(r-4.7-any)mixpower_1.2.0.tar.gz(r-4.6-any)
mixpower_1.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
mixpower/json (API)

# 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.45 score 1 stars 9 scripts 406 downloads 66 exports 13 dependencies

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

TargetResultTimeFilesSyslog
linux-develOK157
source / vignettesOK248
linux-releaseOK134
macos-releaseOK172
macos-oldrelOK194
windows-develOK108
windows-releaseOK111
windows-oldrelOK110
wasm-releaseOK108

Exports:fit_modelmp_assumptionsmp_attach_calibrationmp_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_custom_dgpmp_d_to_betamp_designmp_elicitmp_extendmp_f_to_betamp_from_fitmp_grid_sample_sizemp_icc_to_sdmp_logodds_to_ormp_manifestmp_methods_textmp_missingmp_or_to_logoddsmp_parallel_clustermp_planmp_powermp_power_adaptivemp_power_checkpointmp_power_curvemp_power_curve_parallelmp_quick_powermp_r2_to_betamp_recommend_methodmp_reportmp_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_stopmp_t_to_betamp_write_reportmp_write_resultsplot_powerrun_parallelsimulate_glmm_binomial_datasimulate_glmm_nb_datasimulate_glmm_poisson_datasimulate_powersummarize_simulationstest_effectvalidate_mp_backend

Dependencies:bootlatticelme4MASSMatrixminqanlmenloptrrbibutilsRcppRcppEigenRdpackreformulas

Validation: is your power number trustworthy?
Calibrate: does the test hold its alpha? | Catching a misspecified model | Recommend: which inference method? | Reporting | Putting it together: mp_plan()

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

Effect sizes: maximal models, fitted pilots, and safeguard power
Maximal models: correlated random slopes | Power from a fitted pilot model | Planning around a smallest effect size of interest | Safeguard power | Reading Type S and Type M errors

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

Extending mixpower with custom backends
The three-function contract | Building a validated backend with mp_backend() | Using mp_scenario() and mp_power() | Built-in backends | Parallel grids | Further reading

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

mixpower intro
Inference options: Wald vs LRT | Binary outcomes (binomial GLMM) | Sensitivity curve for binomial outcomes | Count outcomes (Poisson vs Negative Binomial) | Sensitivity curves (count outcomes)

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

Reproducibility workflow
Run analysis and capture manifest | Bundle results and export | Regenerating from manifest and seed | One-row manifest for saving

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

Designing studies

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

Diagnostics and sensitivity

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

Running simulations

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

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
Record a calibration result on a scenariomp_attach_calibration
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 data: power _and_ Type I errormp_compare_models
Plug a custom data-generating function into the mixpower pipelinemp_custom_dgp
Create a study design specificationmp_design
Elicit assumptions from standardized scientific quantitiesmp_elicit
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
Plan power the calibrate-first waymp_plan
Simulation-based power estimation (engine-agnostic core)mp_power
Adaptive (sequential) power simulationmp_power_adaptive
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
Build a full "trust report" for a power analysismp_report
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
Stopping rule for adaptive power simulationmp_stop
Write a power-analysis report to a filemp_write_report
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