Learn R Programming

modsem (version 1.0.16)

is_interaction_model: Check if model object has interaction terms

Description

Check if model object has interaction terms

Usage

is_interaction_model(object)

Value

Logical. TRUE if the model has an interaction term, otherwise it returns FALSE.

Arguments

object

An object of class modsem_pi or modsem_da, respectively.

Examples

Run this code
m1 <- '
# Outer Model
  X =~ x1 + x2 + x3
  Z =~ z1 + z2 + z3
  Y =~ y1 + y2 + y3

# Inner Model
  Y ~ X + Z + X:Z
'

est_dca <- modsem(m1, oneInt, method = "dblcent")
is_interaction_model(est_dca)

if (FALSE) {
est_lms <- modsem(m1, oneInt, method = "lms")
is_interaction_model(est_lms)
}

Run the code above in your browser using DataLab