- formula
An lme4-style model formula (e.g. outcome ~ predictor1 * predictor2 + (1 | id)).
- design
A PowRPriori_design object created by define_design().
- test_parameter
A character vector of the variable names to test for power.
If NULL (default), power is calculated for all fixed effects except the intercept. Note: The parameter names need to
comply with the names expected by the model. Correctly naming of the variables is aided by the output of the get_fixed_effects_structure() helper function.
- fixed_effects
A named list of the fixed-effects coefficients. It is highly
recommended to generate this using get_fixed_effects_structure() or
fixed_effects_from_average_outcome().
- random_effects
A named, nested list specifying the standard deviations (SDs)
and (if applicable) correlations of the random effects. It is highly
recommended to generate this using get_random_effects_structure(). If this parameter is not used, icc_specs and overall_variance need to be supplied.
- icc_specs
Optional. A named list of Intraclass Correlation Coefficients for
defining simple random-intercept models. Must be used with overall_variance.
- overall_variance
The total variance of the outcome, required when icc_specs is used.
- family
The model family: "gaussian" (for LMMs), "binomial" (for logistic GLMMs),
or "poisson" (for poisson GLMMs).
- power_crit
The desired statistical power level (e.g., 0.80 for 80%).
- n_start
The starting sample size for the simulation.
- n_increment
The step size for increasing the sample size in each iteration.
- max_simulation_steps
A hard stop for the simulation, limiting the number of
sample size steps to prevent infinite loops. Defaults to 100 steps.
- n_issue_stop_prop
The proportion of model issues (e.g., singular fits,
non-convergence) at which the simulation will be automatically canceled. Defaults to a proportion of 20%.
- n_is_total
Boolean that controls how sample sizes are interpreted. If TRUE
(default), n_start refers to the total sample size. If FALSE, it refers to
the sample size per cell (see define_design() for details on nested designs).
- n_sims
The number of simulations to run for each sample size step. Defaults to 2000.
- alpha
The significance level (alpha) for the power calculation. Defaults to 0.05.
- parallel_plan
A string specifying the future plan for parallel processing.
Defaults to "multisession" to enable parallel computing. Use "sequential" for debugging.