Estimation latent interactions through Mplus
modsem_mplus.Rd
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,
...
)
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 reliablity-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 thechoose
argument.- ...
arguments passed to other functions
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)
}
# }