Approximative power calculation for multiple contrast tests which are based on normal approximation.
powermcpn(ExpTeststat, corrH1, crit, alternative = c("two.sided", "less", "greater"),
alpha = 0.05, ptype = c("global", "anypair", "allpair"), ...)
numeric vector: the expectation of the test statistics under the alternative
a numeric matrix, the correlation matrix of the teststatistics under the alternative, must have same number of columns and rows as length of ExpTeststat
a single numeric value, the critical value of the test; if not specified a critical value is computed as an equicoordinate (1-alpha
) quantile of a central multivariate normal distribution with correlation corrH1
a character string, specifying the direction of the alternative hypotheses, options are "two.sided", "less", "greater"; alternative
primarily controls for which directional decisions power is calculated, in case that argument crit
is not specified, alternative
also controls the choice of the critical value.
a single numeric value: the FWER for the multiple test, defaults to 0.05
a single character string, naming the type of rejection probability to be computed; options are "global"
for the overall rejection probability (irrespective which contrasts are under the null or the alternative), "anypair"
for the rejection probability considering only those contrasts under the alternative, "global"
for the probability that all elementary alternatives are rejected.
further arguments, which are passed to the functions qmvnorm
and pmvnorm
, mainly to control the computation errors, see help GenzBretz(mvtnorm)
for details
A list consisting of the following items:
a numeric value the computed power, with estimated computational error as an attribute
the expected values of the test statistics corresponding to the contrasts and rhs, and a column with [0,1] values, indicating whether the corresponding contrasts was under the alternative (1) or under the null (0)
a single numeric value, the critical value used for power computation
a single character string, as input
a single character string, as input
a single numeric value, as input
For (standard type and user-defined) multiple contrast tests based on approximation with the multivariate normal distribution, three types of rejection probabilities in the multiple testing problem can be computed.
The global rejection probability (power="global"
), i.e. the probability that at least one of the elementary null hypotheses is rejected, irrespective, whether this (or any contrast!) is under the corresponding elementary alternative). As a consequence this probability involves elementary type-II-errors for those contrasts which are under their elementary null hypothesis.
The probability to reject at least one of those elementary null hypotheses which are indeed under their corresponding elementary alternatives (power="anypair"
). Technically, this is achieved by omitting those contrasts under the elementary null and, for a given critical value, compute the rejection probability from a multivariate normal distribution with reduced dimension. Note that for 'two-sided'
alternatives, type III-errors (rejection of the two-sided null in favor of the wrong direction) are included in the power.
The probability to reject all elementary null hypotheses which are indeed under their corresponding elementary alternatives (power="allpair"
). Also here, for 'two-sided' alternatives type III-error contribute to the computed 'allpair power'. Note further that two-sided allpair power is simulated based on multivariate normal random numbers.
Whether a given hypothesis is under the alternative hypothesis is currently checked via abs(ExpTeststat) > 10*.Machine$double.eps
, ExpTeststat < -10*.Machine$double.eps
and ExpTeststat > 10*.Machine$double.eps
, for alternatives c("two.sided", "less", "greater")
, respectively.