modsem_mplus {modsem} | R Documentation |
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,
...
)
Arguments
model.syntax |
lavaan/modsem syntax |
data |
dataset |
estimator |
estimator argument passed to |
type |
type argument passed to |
algorithm |
algorithm argument passed to |
processors |
processors argument passed to |
integration |
integration argument passed to |
rcs |
Should latent variable indicators be replaced with reliability-corrected
single item indicators instead? See |
rcs.choose |
Which latent variables should get their indicators replaced with
reliability-corrected single items? It is passed to |
rcs.scale.corrected |
Should reliability-corrected items be scale-corrected? If |
... |
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
'
## Not run:
# 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)
}
## End(Not run)