analyze: Analyzes a single 'mp_data' using 'lme4::lmer'

analyzeR Documentation

Analyzes a single mp_data using lme4::lmer

Description

Analyzes a single mp_data based on the data generating model.

Usage

analyze(data, alpha = 0.05, no_lrt = FALSE, ...)

Arguments

data

a mp_data.

alpha

the significance level to determine if an effect is statistically significant. If NULL then no nested model testing is conducted.

no_lrt

do not perform additional likelihood ratio tests. Setting to TRUE will speed up the analysis because the model is only fit once.

...

other arguments passed to lme4::lmer().

Value

A list that with the following named elements:

  • estimates: The estimates from fitting the model.

  • sig_test: The logical if the estimates were statistically siginificant based on alpha.

  • parameters: The mp_parameters extracted from data.

Examples

# Create Model
model <- (
    outcome('Y')
    + within_predictor('X')
    + effect_size(icc = 0.1)
)
# Set seed
set.seed(198723)
# Create data set and analyze
model |> generate(5, 50) |> analyze() -> results

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