correlations {mlmpower}R Documentation

Specify the Correlation Structure for the Model

Description

Creates a list of correlations to be added to a mp_model.

Usage

correlations(within, between, randeff)

Arguments

within

a single numeric value or mp_corr_func that specifies random correlations. Corresponds to the level-1 correlation among predictors.

between

a single numeric value or mp_corr_func that specifies random correlations. Corresponds to the level-2 correlation among predictors.

randeff

a single numeric value or mp_corr_func that specifies random correlations. Corresponds to the random effects correlation among predictors.

Details

The default values are random(0.1, 0.3). Currently randeff are required to be zero if more than one random slope is in the model.

Value

A list that corresponds to each correlation value.

See Also

random() fixed()

Examples

(
    outcome('Y')
    + within_predictor('X')
    + effect_size(
        icc = c(0.1, 0.2),
        within = 0.3
    )
    # Defaults
    + correlations(
        within  = random(0.1, 0.3),
        between = random(0.1, 0.3),
        randeff = random(0.1, 0.3)
    )
)

[Package mlmpower version 1.0.8 Index]