Computes the unconditional rejection probability (local size) of Woolf's asymptotic Wald test for \(H_0\): OR = \(\theta_0\) at nuisance parameter \(p_0\), where \(p_1 = p_0 / (p_0 + \theta_0 (1 - p_0))\). Rejects \(H_0\) when \(|\log \hat{\theta} - \log \theta_0| / SE(\log \hat{\theta}) > z_{\alpha/2}\), where \(\hat{\theta} = u(n-v) / ((m-u)v)\). Uses the Haldane correction (replacing zero cells with 0.5) to handle tables where one or more cells are zero, matching the SAS macro.
Arguments
- nuisance
The nuisance parameter \(p_0\): success probability in group 1 under \(H_0\). Must be in \([0, 1]\).
- .odds_ratio
The null hypothesis odds ratio \(\theta_0\). No default.
- .m
Number of trials in group 1.
- .n
Number of trials in group 2.
- .alpha
Nominal significance level \(\alpha\). No default.
Value
A single numeric value: the local size of Woolf's asymptotic test at the given nuisance parameter, in \([0, 1]\).
