Learn R Programming

mlmpower (version 1.0.9)

is_valid: Check if a Model is Properly Specified

Description

This function is used to validate if a mp_model is correct. If the model is incorrect an appopriate error message describing while will be supplied

Usage

is_valid(x)

Value

Invisibly returns the original model.

Arguments

x

a mp_model

Examples

Run this code
# Create Model
model <- outcome('Y') + within_predictor('X')
# Throws error
tryCatch(
    is_valid(model),
    error = print
)
# Succeeds
is_valid(model + effect_size(icc = 0.1))

Run the code above in your browser using DataLab