Skip to contents

Check if model object has interaction terms

Usage

is_interaction_model(object)

Arguments

object

An object of class modsem_pi or modsem_da, respectively.

Value

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

Examples

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)
#> [1] TRUE

# \dontrun{
est_lms <- modsem(m1, oneInt, method = "lms")
is_interaction_model(est_lms)
#> [1] TRUE
# }