Learn R Programming

modsem (version 1.0.11)

modsem_mplus: Estimation latent interactions through Mplus

Description

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,
  ...
)

Value

modsem_mplus object

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.

...

arguments passed to other functions

Examples

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

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

if (FALSE) {
# 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)
}
}

Run the code above in your browser using DataLab