levels.mp_variable: Obtain Level of Observation for a Variable

View source: R/variables.R

levels.mp_variableR Documentation

Obtain Level of Observation for a Variable

Description

Returns which level a variable is observed at in the multilevel model.

Usage

## S3 method for class 'mp_variable'
levels(x)

Arguments

x

a mp_variable.

Value

Returns a single integer of the level of observation

Examples

# Returns 1
levels(
    within_predictor(
        'X',
        weight = 1,
        mean = 5,
        sd = 10,
        icc = 0.1
    )
)

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