effect_size {mlmpower}R Documentation

Specify the Effect Size for the Model

Description

Creates a list of effect sizes to be added to a mp_model.

Returns suggested ICC's for cross-sectional studies (0.05, 0.15, and 0.25).

Returns suggested ICC ranges for longitudinal studies (0.40, 0.50, and 0.60).

Usage

effect_size(icc, within, between, random_slope, product)

cross_sectional()

longitudinal()

Arguments

icc

a numeric vector of global ICC values for mp_variable who are left unspecified. Values must be between 0 and 1.

within

a single numeric value that corresponds to the proportion of variance explained by the within variables.

between

a single numeric value that corresponds to the incremental proportion of variance explained by the between variables.

random_slope

a single numeric value that corresponds to the proportion of variance explained by the random slopes.

product

a single numeric value that corresponds to the proportion of variance explained by the product terms.

Value

A list that corresponds to each R2 value.

Examples

# Set ICCs
(
    outcome('Y')
    + within_predictor('X')
    + effect_size(
        icc = c(0.1, 0.2),
        within = 0.3
    )
)

# With cross-sectional ICC
(
    outcome('Y')
    + within_predictor('X')
    + effect_size(
        icc = cross_sectional,
        within = 0.3
    )
)

# With longitudinal ICC
(
    outcome('Y')
    + within_predictor('X')
    + effect_size(
        icc = longitudinal,
        within = 0.3
    )
)

[Package mlmpower version 1.0.8 Index]