Value can be set as baseline by specifying exp_value
. This is used
when the exposed and case values are not in the right place.
It produces a table with Odds Ratio,95% CI as well as
p-value. If strata
is specified, Mantel-Haenzsel
Pooled
estimates of Odds Ratio
is generated along with Chi-sqaured test for heterogeneity.
The following entails formulas used for calculating measures.
$$Risk among exposed, R1 = A / (A + C)$$
$$Risk among unexposed, R0 = B / (B + D)$$
$$Number among exposed, N1 = A + B$$
$$Number among unexposed, N0 = C + D$$
$$Number among diseased, D1 = A + C$$
$$Number among health, D0 = B + D$$
$$Sample size, N = N1 + N0$$
Risk Ratio, RR
Risk ratio is sometimes called as relative risk (RR).
$$Risk Ratio = R1 / R0$$
using delta method, See page 155 of Essential Medical Statistics
$$SE(log RR) = sqrt(1/A - 1/N1 + 1/C - 1/N0)$$
$$Lower Limit of CI = exp(log RR - 1.96 x SE(log RR)) $$
$$Upper Limit of CI = exp(log RR + 1.96 x SE(log RR)) $$
Test of null hypothesis for Risk Ratio
$$z = log RR / SE(log RR)$$
Mantel-Haenszel Method for RR
k = Strata
$$RR_MH = \sum{Ak x N0k / Nk} / \sum{Ck x N1k / Nk}$$
$$SE(log RR_MH) = \sqrt{ \sum{D1k x N1k x N0k / Nk^2 - Ak x Ck / Nk} / \sum{Ak x N0k / Nk} x \sum{Ck x N1k / Nk}}$$
$$Lower Limit of CI = exp(log RR_MH - 1.96 x SE(log RR_MH)) $$
$$Upper Limit of CI = exp(log RR_MH + 1.96 x SE(log RR_MH)) $$
Mantel<U+2013>Haenszel test statistic
A test of association (H0: RR_MH = 1 cohort studies; H0: RR_MH = 1 case<U+2013>control studies)
is carried out with the Mantel<U+2013>Haenszel test statistic using chi-squared distribution:
$$x2_MH = (\sum{Ak} - \sum{N1k x M1k / Nk})^2 / \sum{N1k x N0k x M1k x M0k / Nk^2 x (Nk - 1)}$$
Degree of freedom is 1.
Risk Difference, RD
$$RD = R1 - R0$$
$$SE(RD) = \sqrt{(R1 (1 - R1) / N1) + R0 (1 - R0) / N0}$$
$$Lower Limit of CI = RD - (1.96 x SE(RD))$$
$$Upper Limit of CI = RD + (1.96 x SE(RD))$$
Test that the difference between two proportions is zero
$$z = RD / SE(RD)$$
Mantel-Haenszel Method for Risk Difference
This method was proposed by Cochran and by Mantel and Haenszel.
Cochran proposed using the weights nkmk/Nk,
which he showed empirically to be optimal in testing a hypothesis of zero
risk difference if the risk differences were constant on a logit scale. These
weights will be called the Cochran-Mantel-Haenszel (CMH) weights and the
estimator based on these weights will be called the CMH estimator.
See details at Thomas W. O'Gorman (1994) doi.org/10.1016/0197-2456(94)90017-5
k = strata
$$Weight of CMH estimator, W = N1k x N2k / Nk$$
$$RD_CMH = \sum{Wk x RDk} / \sum{Wk}$$
$$Variance of RD_CMH, Lk = (Ak x Bk x N0^3 + Ck x Dk x N1^3) / N1k x N0k x Nk^2$$
$$Lower limit of CI = RD_CMH - (1.96 x \sum{Lk}^1/2 / \sum(Wk))$$
$$Lower limit of CI = RD_CMH + (1.96 x \sum{Lk}^1/2 / \sum(Wk))$$
Mantel<U+2013>Haenszel test statistic: Same as Risk Ratio
A test of association (H0: RD_CMH = 1 cohort studies; H0: RD_CMH = 1 case<U+2013>control studies)
is carried out with the Mantel<U+2013>Haenszel test statistic using chi-squared distribution:
$$x2_MH = (\sum{Ak} - \sum{N1k x M1k / Nk})^2 / \sum{N1k x N0k x M1k x M0k / Nk^2 x (Nk - 1)}$$
Degree of freedom is 1.
Population Attributable Risk, PAR
A measure of the proportion of individuals in the total population with
the disease attributed to exposure to the risk factor is given by the
attributable risk (AR). P is the prevalence of the risk factor in the population
and RR is the relative risk for disease associated with the risk factor.
$$PAR = P (RR - 1) / (1 + P (RR - 1))$$
$$Lower limit of CI = P (RR_LL - 1) / (1 + P (RR_LL - 1))$$
$$Upper limit of CI = P (RR_UL - 1) / (1 + P (RR_UL - 1))$$
RR_LL = Lower limit of CI of RR
RR_UL = Upper limit of CI of RR
Attributable Risk, AR
The function produces Attributable Risk percent (Raw form = not converted to 100%).
$$AR = RR - 1 / RR$$
$$SE(AR) = \sqrt{D1 / N (1 - D1 / N) (1/N1 + 1/N0)}$$
Efficacy
The efficacy of a treatment or intervention is measured by the proportion of cases
that it prevents. Efficacy is directly calculated from the risk ratio
comparing disease outcome in the treated versus control group. For a successful
treatment (or intervention) this ratio will be less than 1.
$$Efficacy = 1 - RR$$
$$Lower limit of CI = 1- RR x exp(1.96 x SE(log RR))$$
$$Lower limit of CI = 1- RR / exp(1.96 x SE(log RR))$$