Skip to contents

Estimation latent interactions through Mplus

Usage

modsem_mplus(
  model.syntax,
  data,
  estimator = "ml",
  type = "random",
  algorithm = "integration",
  processors = 2,
  integration = 15,
  rcs = FALSE,
  rcs.choose = NULL,
  rcs.scale.corrected = TRUE,
  output.std = TRUE,
  ...
)

Arguments

model.syntax

lavaan/modsem syntax

data

dataset

estimator

estimator argument passed to Mplus

type

type argument passed to Mplus

algorithm

algorithm argument passed to Mplus

processors

processors argument passed to Mplus

integration

integration argument passed to Mplus

rcs

Should latent variable indicators be replaced with reliability-corrected single item indicators instead? See relcorr_single_item.

rcs.choose

Which latent variables should get their indicators replaced with reliability-corrected single items? It is passed to relcorr_single_item as the choose argument.

rcs.scale.corrected

Should reliability-corrected items be scale-corrected? If TRUE reliability-corrected single items are corrected for differences in factor loadings between the items. Default is TRUE.

output.std

Should STANDARDIZED be added to OUTPUT?

...

arguments passed to other functions

Value

modsem_mplus object

Examples

# Theory Of Planned Behavior
m1 <- '
# Outer Model
  X =~ x1 + x2
  Z =~ z1 + z2
  Y =~ y1 + y2 

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

# \dontrun{
# Check if Mplus is installed
run <- tryCatch({MplusAutomation::detectMplus(); TRUE},
                error = \(e) FALSE)

if (run) {
  est_mplus <- modsem_mplus(m1, data = oneInt)
  summary(est_mplus)
}
# }