data("BSG2014")
# fit robust mediation model and extract coefficients
fit <- fit_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict")
coef(fit)
# run fast-and-robust bootstrap test and extract coefficients
boot <- test_mediation(fit, level = 0.9)
coef(boot, type = "data") # from original sample
coef(boot, type = "boot") # means of bootstrap replicates
Run the code above in your browser using DataLab