  The indirect effect of an exposure on an outcome through an intermediate
variable can be identified by a product of regression coefficients under
certain causal and regression modeling assumptions. Thus, the null hypothesis
of no indirect effect is a composite null hypothesis, as the null holds if
either regression coefficient is zero. A consequence is that existing
hypothesis tests are either severely underpowered near the origin (i.e., when
both coefficients are small with respect to standard errors) or do not preserve
type 1 error uniformly over the null hypothesis space. We propose hypothesis
tests that (i) preserve level alpha type 1 error, (ii) meaningfully improve
power when both true underlying effects are small relative to sample size, and
(iii) preserve power when at least one is not. One approach gives a closed-form
test that is minimax optimal with respect to local power over the alternative
parameter space. Another uses sparse linear programming to produce an
approximately optimal test for a Bayes risk criterion. We provide an R package
that implements the minimax optimal test.
