Learn R Programming

mlmpower (version 1.0.11)

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

Description

Outputs mp_power as a data frame.

Usage

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

Value

returns a data frame

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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab