# NOT RUN {
data("BSG2014")
# run fast and robust bootstrap test
robust_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = TRUE)
# create plot for robust bootstrap test
density_plot(robust_boot)
density_plot(robust_boot, color = "#00BFC4", fill = "#00BFC4")
# run standard bootstrap test
standard_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = FALSE)
# compare robust and standard tests
tests <- list(Standard = standard_boot, Robust = robust_boot)
density_plot(tests)
# the plot can be customized in the usual way
density_plot(tests) + theme_bw() +
labs(title = "Standard vs robust bootstrap test")
# }
Run the code above in your browser using DataLab