# NOT RUN {
data("BSG2014")
# run fast and robust bootstrap test
robust_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = TRUE)
# create diagnostic plot of robust regression weights
weight_plot(robust_boot) +
scale_color_manual("", values = c("black", "#00BFC4")) +
theme(legend.position = "top")
# plot only the regression model for the hypothesized mediator
weight_plot(robust_boot, outcome = "TaskConflict") +
scale_color_manual("", values = c("black", "#00BFC4")) +
theme(legend.position = "top")
# }
Run the code above in your browser using DataLab