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,] 1.4917925 0.03773461
#> [2,] -1.5545253 -1.74423940
#> [3,] -0.5069587 0.22486544
#> [4,] 0.7110473 -0.22902736
#> [5,] -1.4115197 -0.97484568
#> [6,] -3.2665908 2.69237242
#> ...
#> * 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 [1 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
#> can reject the null for its alternative with confidence 0.050
#> ...
#> * (conservative) p-value:
#> [1] 0.969899284 0.098432452 0.588878203 0.751216581 0.329636815 0.007094567
#> ...
plot(mt)