Skip to content

pawlenartowicz/MCPower-gui

Repository files navigation

Windows macOS Linux License: GPL v3 DOI

███╗   ███╗  ██████╗ ██████╗ 
████╗ ████║ ██╔════╝ ██╔══██╗ ██████╗ ██╗    ██╗███████╗██████╗ 
██╔████╔██║ ██║      ██║  ██║██╔═══██╗██║    ██║██╔════╝██╔══██╗
██║╚██╔╝██║ ██║      ██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝
██║ ╚═╝ ██║ ██║      ██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗
██║     ██║ ╚██████╗ ██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║
╚═╝     ╚═╝  ╚═════╝ ╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝

MCPower GUI

MCPower GUI is a desktop application for Monte Carlo power analysis. It provides a graphical interface to the MCPower library, letting you plan sample sizes and estimate statistical power for complex study designs — without writing any code.

Download

Platform Link
Windows MCPower.exe
Linux MCPower-linux
macOS MCPower-macos.zip
if above do not work SourceForge

No Python installation required — these are standalone executables.

Windows

  1. Download MCPower.exe.
  2. Double-click to run.

Note: Windows SmartScreen may show a warning ("Windows protected your PC") because the application is not code-signed. Code signing certificates cost ~$100/year, which is not feasible for a free open-source project. The app is safe — you can verify the source code in this repository. To proceed: click More infoRun anyway.

Your antivirus software may also flag the file. This is a known false positive caused by the packaging tool (PyInstaller) used to create standalone Python executables. Many legitimate open-source applications trigger the same warning.

Linux

  1. Download MCPower-linux.
  2. Open a terminal in the download folder:
    • File manager: Right-click in the folder → Open Terminal Here
    • Or manually: open a terminal and run cd ~/Downloads
  3. Make the file executable and run it:
    chmod +x MCPower-linux
    ./MCPower-linux

macOS

  1. Download MCPower-macos.zip.
  2. Double-click the .zip to unzip it — MCPower.app will appear in the same folder.
  3. Drag MCPower.app to your Applications folder (optional but recommended).
  4. Double-click MCPower.app to launch it.

First launch — Gatekeeper warning: macOS will block the app with a message like "MCPower cannot be opened because it is from an unidentified developer." This happens because the app is not signed with a paid Apple Developer certificate. To allow it:

  • Open System SettingsPrivacy & Security
  • Scroll down to the Security section
  • You will see a message: "MCPower was blocked from use because it is not from an identified developer" — click Open Anyway
  • On the next prompt, click Open

You only need to do this once. After that, the app opens normally.

Full documentation is available in-app via the Documentation menu item.

What is power analysis?

Statistical power is the probability that a study will detect a real effect when one exists. A power analysis helps you determine:

  • Find Power: Given a sample size, what is the probability of detecting your expected effects?
  • Find Sample Size: What sample size do you need to achieve a target power level (e.g., 80%)?

Why Monte Carlo simulation?

Traditional power formulas work for simple designs but break down with interactions, correlated predictors, categorical variables, or non-normal data. MCPower uses Monte Carlo simulation — it generates thousands of synthetic datasets under your assumptions, fits the statistical model to each, and counts how often the effects are detected. This approach handles arbitrary complexity.

Why MCPower?

Just type your formula. Enter your model the way you'd write it in R or a stats textbook — outcome = treatment + covariate + treatment*covariate. MCPower handles everything else: parsing the formula, setting up the simulation, and managing interactions and factor coding. No programming required. Logistic regression support is coming soon.

Scenarios show you the full picture. Real studies rarely match textbook conditions — effect sizes may be smaller than expected, distributions may be skewed, or variance may not be constant. One checkbox enables automatic robustness testing. MCPower runs your analysis under optimistic, realistic, and worst-case conditions, so instead of a single number you get a range that shows how sensitive your design is to violated assumptions.

Upload your data, skip the guesswork. Drop in a CSV and MCPower auto-detects variable types (continuous, binary, or categorical), preserves real distributions, and handles correlations between predictors. String columns (e.g. "control", "drug_a", "drug_b") are supported and auto-detected as factors. Factor levels use the original values from your data — so cyl with values [4, 6, 8] shows up as cyl[4], cyl[6], cyl[8] instead of abstract indices. No need to manually specify whether each variable is normal, skewed, or categorical — MCPower samples from the empirical distribution. This is especially useful when you have pilot data or a related dataset and want your power analysis to reflect actual conditions.

Screenshots

Model setup ANOVA mode (dark)
Model setup ANOVA mode (dark theme)
Define formula, variable types, and effect sizes Set up factors with custom levels and proportions
Running analysis Results — power chart
Running analysis Results — power bar chart
Progress tracking with simulation count Scenario comparison and replication script
Results — power curves (dark)
Power curves (dark theme)
Find Sample Size — power curves across sample sizes

App workflow

  1. Model tab — Define your study design: enter a formula, set variable types, specify effect sizes, and optionally upload empirical data with correlations.
  2. Analysis tab — Choose analysis mode (Find Power or Find Sample Size), set target power, enable scenarios, and select multiple testing corrections.
  3. Results tab — View power tables, bar charts, power curves, scenario comparisons, and a replication script you can run independently.

Formula syntax

MCPower uses R-style formula notation:

Formula Meaning
y = x1 + x2 Two main effects
y = x1 + x2 + x1:x2 Two main effects + interaction
y = x1 * x2 Shorthand for x1 + x2 + x1:x2
y ~ x1 + (1|group) Random intercept (mixed model)
y ~ x1 + (1 + x1|group) Random intercept + slope (mixed model)

Both = and ~ are accepted as separators between the dependent variable and predictors.

Built on

MCPower GUI is built on MCPower. MCPower's mixed-effects solver is validated against R's lme4 across 95 scenarios with 100% pass rate.

License & Citation

GPL v3. If you use MCPower in research, please cite:

Lenartowicz, P. (2025). MCPower: Monte Carlo Power Analysis for Complex Statistical Models (Version ) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.16502734

Replace <your version> with the version you used — check with import mcpower; print(mcpower.__version__).

@software{mcpower2025,
  author    = {Lenartowicz, Pawe{\l}},
  title     = {{MCPower}: Monte Carlo Power Analysis for Complex Statistical Models},
  year      = {2025},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.16502734},
  url       = {https://doi.org/10.5281/zenodo.16502734}
}

Support

This project is free and open-source. If you'd like to support its development, donations are appreciated!

Support this project

About

Desktop GUI for MCPower Monte Carlo statistical power analysis for complex models

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages