dvs_ivs | R Documentation |
A path model with three predictors and three outcomes, for illustration.
dvs_ivs
A data frame with 100 rows and 7 variables:
Outcome variable 1. Numeric.
Outcome variable 2. Numeric.
Outcome variable 3. Numeric.
Predictor 1. Numeric.
Predictor 2. Numeric.
Predictor 3. Numeric.
Group variable: "gp1" or "gp2". String.
data(dvs_ivs)
library(lavaan)
mod <-
"
y1 ~ x1 + x2 + x3
y2 ~ x1 + x3
y3 ~ y2 + x2
"
fit <- sem(mod, dvs_ivs)
parameterEstimates(fit)
fit_gp <- sem(mod, dvs_ivs, group = "gp")
parameterEstimates(fit_gp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.