confint.test_mediation: Confidence intervals for (robust) mediation analysis

Description Usage Arguments Value Author(s) See Also Examples

Description

Extract or compute confidence intervals for coefficients from (robust) mediation analysis.

Usage

1
2
3
4
5
6
7
## S3 method for class 'boot_test_mediation'
confint(object, parm = NULL,
  level = NULL, other = c("boot", "theory"), ...)

## S3 method for class 'sobel_test_mediation'
confint(object, parm = NULL,
  level = 0.95, ...)

Arguments

object

an object inheriting from class "test_mediation" containing results from (robust) mediation analysis.

parm

an integer, character or logical vector specifying the coefficients for which to extract or compute confidence intervals, or NULL to extract or compute confidence intervals for all coefficients.

level

for the "boot_test_mediation" method, this is ignored and the confidence level of the bootstrap confidence interval for the indirect effect is used. For the other methods, the confidence level of the confidence intervals to be computed. The default is to compute 95% confidence intervals.

other

a character string specifying how to compute the confidence interval of the effects other than the indirect effect(s). Possible values are "boot" (the default) to compute bootstrap confidence intervals using the normal approximation (i.e., to assume a normal distribution of the corresponding effect with the standard deviation computed from the bootstrap replicates), or "theory" to compute confidence intervals via statistical theory (e.g., based on a t-distribution the coefficients are estimated via regression). Note that this is only relevant for mediation analysis via a bootstrap test, where the confidence interval of the indirect effect is always computed via a percentile-based method due to the asymmetry of its distribution.

...

additional arguments are currently ignored.

Value

A numeric matrix containing the requested confidence intervals.

Author(s)

Andreas Alfons

See Also

test_mediation, coef

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data("BSG2014")

# run fast and robust bootstrap test
robust_boot <- test_mediation(BSG2014,
                              x = "ValueDiversity",
                              y = "TeamCommitment",
                              m = "TaskConflict",
                              robust = TRUE)
confint(robust_boot, other = "boot")

# run standard bootstrap test
standard_boot <- test_mediation(BSG2014,
                                x = "ValueDiversity",
                                y = "TeamCommitment",
                                m = "TaskConflict",
                                robust = FALSE)
confint(standard_boot, other = "theory")

robmed documentation built on Nov. 5, 2018, 5:06 p.m.