API Reference

Complete reference for the MCPower class and its public API.


Quick Reference

Method / Class

Description

MCPower(formula)

Create a power analysis model from an R-style formula

find_power()

Estimate statistical power at a given sample size

find_sample_size()

Find the minimum sample size for target power

set_effects()

Set standardized effect sizes (beta weights)

set_variable_type()

Declare binary, factor, or non-normal variables

set_correlations()

Specify predictor correlations

set_alpha()

Set the significance level

set_power()

Set the target power level (for sample size search)

set_seed()

Set random seed for reproducibility

set_simulations()

Set number of Monte Carlo simulations

set_parallel()

Configure parallel execution

upload_data()

Upload empirical data for realistic simulation

set_factor_levels()

Define named factor levels

set_cluster()

Configure clustering for mixed-effects models

set_scenario_configs()

Customize scenario analysis parameters

set_max_failed_simulations()

Set convergence failure tolerance

Correction methods

Multiple testing correction options

Progress reporting

Progress callbacks and built-in reporters

Return values

Result dictionary structures


Pages