View source: R/mediation.test.minimax.R
BH_mediation_test_minimax | R Documentation |
\delta_x \times \delta_y=0
" against its alternative
"\delta_x \times \delta_y\neq 0
" based on the test statistic in the
real plane, aiming for a control of false discovery rate à la
Benjamini-Hochberg.Carries out the minimax optimal test of the composite null
"\delta_x \times \delta_y=0
" against its alternative
"\delta_x \times \delta_y\neq 0
" based on the test statistic in the
real plane, aiming for a control of false discovery rate à la
Benjamini-Hochberg.
BH_mediation_test_minimax(t, alpha = 0.05, truncation = 0, sample_size = Inf)
t |
A |
alpha |
A positive |
truncation |
A nonnegative |
sample_size |
An |
For details, we refer to the technical report "Optimal Tests of the Composite Null Hypothesis Arising in Mediation Analysis", by Miles & Chambaz (2021), https://arxiv.org/abs/2107.07575
A list, consisting of:
a vector
of two
numeric
s, the test statistic, or a 'n x 2' matrix
of such
test statistics;
a numeric
, the false discovery
rate;
a nonnegative numeric
, used to bound
the rejection region away from the null hypothesis space
an integer
, the size of the sample used to
derive the test statistic
a vector
of
logical
s, FALSE
if the null hypothesis can be rejected
for the alternative at false discovery rate 'alpha' and TRUE
otherwise;
a vector
of numeric
s, the
p-values of the tests;
the character
"minimax+BH".
mediation_test_minimax()
, upon which this function builds.
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 <- BH_mediation_test_minimax(x, alpha = 0.05))
plot(mt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.