data("BSG2014")
# seed to be used for the random number generator
seed <- 20211117
# perform mediation analysis via robust bootstrap test ROBMED
set.seed(seed)
robust_boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
robust = TRUE)
# construct flextable of results
ft <- to_flextable(robust_boot)
# export to Microsoft Word
file_name <- tempfile(fileext = ".docx")
export_docx(ft, file = file_name)
Run the code above in your browser using DataLab