
Prints the output of function
s mediation_test_minimax
and mediation_test_Bayes
.
print.mediation.test.Rd
Prints the output of function
s mediation_test_minimax
and mediation_test_Bayes
.
Usage
# S3 method for class 'mediation.test'
print(x, n = 6L, ...)
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))
#> Testing the composite null 'delta_x * delta_y = 0' against its alternative 'delta_x * delta_y != 0':
#> * method:
#> minimax
#> * test statictic:
#> [,1] [,2]
#> [1,] -0.5571536 3.2727921
#> [2,] -1.3308766 -0.3654159
#> [3,] 0.2078743 1.1028255
#> [4,] -2.1843628 -0.5065567
#> [5,] 0.5066974 -1.2523653
#> [6,] 0.6115233 3.0262394
#> ...
#> * wished type-I error:
#> [1] 0.05
#> * user-supplied truncation parameter:
#> [1] 0
#> * size of the sample used to derive the test statistic ('Inf' to use a Gaussian approximation; otherwise, use a product of Student laws):
#> [1] Inf
#> * decision [0 rejection(s) overall]:
#> cannot reject the null for its alternative with confidence 0.050
#> cannot reject the null for its alternative with confidence 0.050
#> cannot reject the null for its alternative with confidence 0.050
#> cannot reject the null for its alternative with confidence 0.050
#> cannot reject the null for its alternative with confidence 0.050
#> cannot reject the null for its alternative with confidence 0.050
#> ...
#> * (conservative) p-value:
#> [1] 0.5774225 0.7148010 0.8353271 0.6124659 0.6123671 0.5408532
#> ...
plot(mt)