data("BSG2014")
# run fast-and-robust bootstrap test
boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
level = 0.9)
# set up information for plot
setup <- setup_ci_plot(boot, parm = "Indirect")
# plot only density and confidence interval
ggplot() +
geom_hline(yintercept = 0, color = "darkgrey") +
geom_pointrange(aes(x = "Robust bootstrap", y = Estimate,
ymin = Lower, ymax = Upper),
data = setup$ci) +
labs(x = NULL, y = "Indirect effect")
Run the code above in your browser using DataLab