Computes the two-sided Fisher exact p-value for \(H_0\): OR =
odds_ratio by summing all probabilities in the conditional
distribution of \(U\) given \(T = t\) that are no greater than the
observed probability \(P_{\theta_0}(U = s \mid T = t)\). The conditional
distribution is the Fisher non-central hypergeometric with the specified odds
ratio, computed via BiasedUrn::dFNCHypergeo(). When
odds_ratio = 1 this reduces to the standard central hypergeometric,
matching the p-value reported by SAS Proc FREQ for \(H_0\): OR = 1.
Arguments
- s
Number of successes observed in group 1. No default.
- t
Total number of successes across both groups (\(t = s + \) successes in group 2); the conditioning variable in the hypergeometric distribution. No default.
- m
Number of trials in group 1. No default.
- n
Number of trials in group 2. No default.
- odds_ratio
Null hypothesis odds ratio \(\theta_0\). Defaults to 1.
See also
local_size_probability() for the local size of the SAS Proc FREQ exact test; power_probability() for the power of the SAS Proc FREQ exact test; modified_fisher_exact_test() for the main user-facing function.
