Learn R Programming

robmed (version 0.1.1)

retest: Retest for mediation

Description

Reperform a (fast and robust) bootstrap test or Sobel's test for the indirect effect based on results from (robust) mediation analysis.

Usage

retest(object, ...)

# S3 method for bootTestMediation retest(object, alternative = c("twosided", "less", "greater"), level = 0.95, type = c("bca", "perc"), ...)

# S3 method for sobelTestMediation retest(object, alternative = c("twosided", "less", "greater"), ...)

Arguments

object

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

alternative

a character string specifying the alternative hypothesis in the test for the indirect effect. Possible values are "twosided" (the default), "less" or "greater".

level

numeric; the confidence level of the confidence interval in the bootstrap test. The default is to compute a 95% confidence interval.

type

a character string specifying the type of confidence interval to be computed in the bootstrap test. Possible values are "bca" (the default) for the bias-corrected and accelerated bootstrap, or "perc" for the percentile bootstrap.

additional arguments to be passed down to methods.

Value

An object of the same class as object with updated test results (see testMediation).

See Also

testMediation