data_med_complicated | R Documentation |
A mediation model with two predictors, two pathways,
data_med_complicated
A data frame with 300 rows and 5 variables:
Predictor 1. Numeric.
Predictor 2. Numeric.
Mediator 1 in Path 1. Numeric.
Mediator 2 in Path 1. Numeric.
Mediator in Path 2. Numeric.
Outcome variable 1. Numeric.
Outcome variable 2. Numeric.
Control variable. Numeric.
Control variable. Numeric.
data(data_med_complicated)
dat <- data_med_complicated
summary(lm_m11 <- lm(m11 ~ x1 + x1 + x2 + c1 + c2, dat))
summary(lm_m12 <- lm(m12 ~ m11 + x1 + x2 + c1 + c2, dat))
summary(lm_m2 <- lm(m2 ~ x1 + x2 + c1 + c2, dat))
summary(lm_y1 <- lm(y1 ~ m11 + m12 + m2 + x1 + x2 + c1 + c2, dat))
summary(lm_y2 <- lm(y2 ~ m11 + m12 + m2 + x1 + x2 + c1 + c2, dat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.