data("BSG2014")
# fit mediation model
fit <- fit_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict")
# set up information for plot
setup <- setup_weight_plot(fit)
# create diagnostic plot of robust regression weights
weight_plot(setup) +
scale_color_manual("", values = c("black", "#00BFC4")) +
theme(legend.position = "top")
Run the code above in your browser using DataLab