get_pi_syntax | R Documentation |
lavaan
syntax for product indicator approachesget_pi_syntax()
is a function for creating the lavaan
syntax used for estimating
latent interaction models using one of the product indicators in lavaan
.
get_pi_syntax(model.syntax, method = "dblcent", match = FALSE, ...)
model.syntax |
|
method |
method to use:
|
match |
should the product indicators be created by using the match-strategy |
... |
arguments passed to other functions (e.g., modsem_pi) |
character
vector
library(modsem)
library(lavaan)
m1 <- '
# Outer Model
X =~ x1 + x2 + x3
Y =~ y1 + y2 + y3
Z =~ z1 + z2 + z3
# Inner model
Y ~ X + Z + X:Z
'
syntax <- get_pi_syntax(m1)
data <- get_pi_data(m1, oneInt)
est <- sem(syntax, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.