Description Usage Arguments Details Value Author(s) See Also Examples
Estimate or extract the p-values for indirect effects in (robust) mediation analysis.
1 2 3 4 5 6 7 |
object |
an object inheriting from class |
... |
additional arguments are currently ignored. |
digits |
an integer determining the number of digits of the p-values to be computed. The default is to compute 4 digits after the comma. |
For bootstrap tests, the p-value is estimated as the smallest significance level alpha for which the (1 - alpha) * 100% confidence interval obtained from the bootstrapped distribution of the indirect effect does not contain 0.
This is a simple implementation, where each digit after the comma is
determined via a grid search. Hence computation time can be long if
confidence intervals are computed via the bias-corrected and accelerated
method ("bca"
).
For Sobel tests, the p-value is already stored in the object returned by
test_mediation
and simply extracted.
A numeric vector containing the p-values for the indirect effect(s).
Andreas Alfons
1 2 3 4 5 6 7 8 9 10 11 12 | data("BSG2014")
## Not run:
# BCa intervals are recommended, but take a while to run
test_bca <- test_mediation(BSG2014,
x = "ValueDiversity",
y = "TeamCommitment",
m = "TaskConflict",
type = "bca")
p_value(test_bca)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.