| data_mod_2w | R Documentation |
A two-moderator model,
with variation in the standard deviation
of x related to one moderator.
data_mod_2w
A data frame with 200 rows and 6 variables:
Outcome variable. Numeric.
Predictor. Numeric.
Moderator 1. Numeric.
Moderator 2. Numeric.
Control variable. Numeric.
Control variable. Numeric.
library(lavaan)
data(data_mod_2w)
lm_out <- lm(y ~ x*w1 + x*w2 + c1 + c2, data_mod_2w)
out <- cond_effects(
wlevels = c("w1", "w2"),
x = "x",
fit = lm_out
)
out
plot(out, facet_grid_cols = "w1", graph_type = "tumble")
plot(out, facet_grid_cols = "w2", graph_type = "tumble")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.