Computes the unconditional power of the conservative (non-randomised) Fisher exact test at response rates \((\pi_1, \pi_2)\). Rejects \(H_0\) only when \(S\) falls strictly outside the critical region \([c_1, c_2]\), equivalent to setting \(\gamma_0 = 1\) in the MFET so that boundary values are never rejected. The test frame should be built for the relevant null odds ratio.
Arguments
- p
Length-2 numeric vector \((\pi_1, \pi_2)\): success probability in group 1 (\(\pi_1\)) and group 2 (\(\pi_2\)) at which power is evaluated.
- .m
Number of trials in group 1.
- .n
Number of trials in group 2.
- .df
Test frame (data frame) generated by
construct_test_frame(), containing critical values \(c_1\), \(c_2\) and randomisation probabilities \(\gamma_1\), \(\gamma_2\) for every possible total \(T\).- .alpha
Nominal significance level \(\alpha\). No default.
- .precision
Numerical precision. No default.
- .superiority
Logical. If
TRUE, power is computed only over tables where the observed rate in group 2 exceeds that in group 1. Defaults toFALSE.
Value
A single numeric value: the power of the conservative (non-randomised) Fisher exact test at the response rates \((\pi_1, \pi_2)\), in \([0, 1]\).
See also
Other power:
power_asymptotic(),
power_modified(),
power_probability(),
power_randomised()
Examples
df <- construct_test_frame(.odds_ratio = 1, .m = 6, .n = 4,
.alpha = 0.05, .precision = 1e-3)
power_conservative(p = c(0.2, 0.6), .m = 6, .n = 4, .df = df,
.alpha = 0.05, .precision = 1e-3)
#> [1] 0.08497562
