retest {robmed} | R Documentation |
Retest for mediation
Description
Re-perform a test for the indirect effect(s) based on results from (robust)
mediation analysis. This function is purely available for computational
convenience if the analysis was accidentally run with the wrong parameter
settings, as it avoids having to re-run the bootstrap procedure. It must
not be abused for p
-hacking.
Usage
retest(object, ...)
## S3 method for class 'boot_test_mediation'
retest(object, alternative, level, type, contrast, ...)
## S3 method for class 'sobel_test_mediation'
retest(object, alternative, order, ...)
Arguments
object |
an object inheriting from class
|
... |
additional arguments to be passed down to methods. |
alternative |
a character string specifying the alternative hypothesis
in the test for the indirect effect. Possible values are |
level |
numeric; the confidence level of the confidence interval in the bootstrap test. |
type |
a character string specifying the type of confidence interval
to be computed in the bootstrap test. Possible values are |
contrast |
a logical indicating whether to compute pairwise contrasts
of the indirect effects. This can also be a character string, with
|
order |
a character string specifying the order of approximation of
the standard error in Sobel's test. Possible values are |
Value
An object of the same class as object
with updated test
results (see test_mediation()
).
Note
From version 0.9.0 onwards, the behavior of this function changed.
For arguments that are not supplied, the corresponding values of
object
are now used as defaults.
Author(s)
Andreas Alfons
See Also
Examples
data("BSG2014")
# run fast-and-robust bootstrap test
boot <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict")
summary(boot)
# now compute 97.5% confidence interval
retest(boot, level = 0.975)