as.data.frame.mp_power: Coerce a 'mp_power' to a Data Frame

as.data.frame.mp_powerR Documentation

Coerce a mp_power to a Data Frame

Description

Outputs mp_power as a data frame.

Usage

## S3 method for class 'mp_power'
as.data.frame(x, row.names = NULL, optional = FALSE, power = TRUE, ...)

Arguments

x

a mp_power.

row.names

passed to base::as.data.frame

optional

passed to base::as.data.frame

power

logical: do you want the power or the estimates

...

other arguments not used by this method.

Value

returns a data frame

Examples

# Create Model
model <- (
    outcome('Y')
    + within_predictor('X')
    + effect_size(icc = 0.1)
)
# Set seed
set.seed(19723)
# Create data set and analyze
# Note: Generally Use more than 50 replications
model |> power_analysis(50, 5, 50) -> powersim
# Obtain Results as a data frame
as.data.frame(powersim)

mlmpower documentation built on June 8, 2025, 11:07 a.m.