| data_mod_2x1w | R Documentation |
A one-moderator model, with a moderator affecting the effects of two predictors.
data_mod_2x1w
A data frame with 200 rows and 6 variables:
Outcome variable. Numeric.
Predictor. Numeric.
Predictor. Numeric.
Moderator. Numeric.
Control variable. Numeric.
Control variable. Numeric.
library(lavaan)
data(data_mod_2x1w)
lm_out <- lm(y ~ x1*w + x2*w + c1 + c2, data_mod_2x1w)
out1 <- cond_effects(
wlevels = "w",
x = "x1",
fit = lm_out
)
out1
plot(out1, graph_type = "tumble")
out2 <- cond_effects(
wlevels = "w",
x = "x2",
fit = lm_out
)
out2
plot(out2, graph_type = "tumble")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.