# NOT RUN {
data("BSG2014")
# run fast and robust bootstrap test
robust_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = TRUE)
# set up information for plot
setup <- setup_ellipse_plot(robust_boot)
# plot only data and tolerance ellipse
ggplot() +
geom_path(aes(x = x, y = y), data = setup$ellipse,
color = "#00BFC4") +
geom_point(aes(x = x, y = y, fill = Weight),
data = setup$data, shape = 21) +
scale_fill_gradient(limits = 0:1, low = "white",
high = "black") +
labs(x = setup$horizontal, y = setup$vertical)
# }
Run the code above in your browser using DataLab