print.mediation.test: Prints the output of 'function's 'mediation_test_minimax' and...

View source: R/utils.R

print.mediation.testR Documentation

Prints the output of functions mediation_test_minimax and mediation_test_Bayes.

Description

Prints the output of functions mediation_test_minimax and mediation_test_Bayes.

Usage

## S3 method for class 'mediation.test'
print(x, ...)

Arguments

x

An output of function mediation_test_minimax or mediation_test_Bayes.

...

Not used.

Value

Nothing.

Examples

n <- 10
x <- MASS::mvrnorm(n, mu = c(0, 0), Sigma = diag(c(1, 1)))
delta <- matrix(stats::runif(2 * n, min = -3, max = 3), ncol = 2)
epsilon <- stats::rbinom(n, 1, 1/2)
delta <- delta * cbind(epsilon, 1 - epsilon)
x <- x + delta
(mt <- mediation_test_minimax(x, alpha = 1/20))
plot(mt)


achambaz/mediation.test documentation built on Oct. 20, 2024, 9:25 a.m.