The FREQ Procedure

Odds Ratio and Relative Risks for 2 x 2 Tables

Odds Ratio (Case-Control Studies)

The odds ratio is a useful measure of association for a variety of study designs. For a retrospective design called a case-control study, the odds ratio can be used to estimate the relative risk when the probability of positive response is small (Agresti, 2002). In a case-control study, two independent samples are identified based on a binary (yes-no) response variable, and the conditional distribution of a binary explanatory variable is examined, within fixed levels of the response variable. See Stokes, Davis, and Koch (2012) and Agresti (2007).

The odds of a positive response (column 1) in row 1 is $ n_{11} / n_{12}$. Similarly, the odds of a positive response in row 2 is $ n_{21} / n_{22}$. The odds ratio is formed as the ratio of the row 1 odds to the row 2 odds. The odds ratio for a $2 \times 2$ table is defined as

\[  \mathit{OR} = \frac{n_{11}/n_{12}}{n_{21}/n_{22}} = \frac{n_{11} ~  n_{22}}{n_{12} ~  n_{21}}  \]

The odds ratio can be any nonnegative number. When the row and column variables are independent, the true value of the odds ratio equals 1. An odds ratio greater than 1 indicates that the odds of a positive response are higher in row 1 than in row 2. Values less than 1 indicate the odds of positive response are higher in row 2. The strength of association increases with the deviation from 1.

The transformation $G = (\mathit{OR}-1)/(\mathit{OR}+1)$ transforms the odds ratio to the range (–1,1) with G = 0 when $\mathit{OR} = 1$; G = –1 when $\mathit{OR} = 0$; and G approaches 1 as OR approaches infinity. G is the gamma statistic, which PROC FREQ computes when you specify the MEASURES option.

The asymptotic $100(1-\alpha )$% confidence limits for the odds ratio are

\[  \left( ~  \mathit{OR} \times \exp ( -z \sqrt {v} ), ~ ~  \mathit{OR} \times \exp ( z \sqrt {v} ) ~  \right)  \]

where

\[  v = \mr {Var} (\ln \mathit{OR}) = \frac{1}{n_{11}} + \frac{1}{n_{12}} + \frac{1}{n_{21}} + \frac{1}{n_{22}}  \]

and z is the $100(1-\alpha /2)$ percentile of the standard normal distribution. If any of the four cell frequencies are zero, the estimates are not computed.

Exact Confidence Limits for the Odds Ratio

When you specify the OR option in the EXACT statement, PROC FREQ computes exact confidence limits for the odds ratio. Because this is a discrete problem, the confidence coefficient for the exact confidence interval is not exactly $(1-\alpha )$ but is at least $(1-\alpha )$. Thus, these confidence limits are conservative. See Agresti (1992) for more information.

PROC FREQ computes exact confidence limits for the odds ratio by using an algorithm based on Thomas (1971). See also Gart (1971). The following two equations are solved iteratively to determine the lower and upper confidence limits, $\phi _1$ and $\phi _2$:

$\displaystyle  \sum _{i=n_{11}}^{n_{\cdot 1}} \binom {n_{1 \cdot }}{i} \binom {n_{2 \cdot }}{n_{\cdot 1} - i} ~  \phi _1^ i ~ ~  / ~ ~  \sum _{i=0}^{n_{\cdot 1}} \binom {n_{1 \cdot }}{i} \binom {n_{2 \cdot }}{n_{\cdot 1}-i} ~  \phi _1^ i ~   $
$\displaystyle  =  $
$\displaystyle  ~  \alpha /2  $
$\displaystyle  \sum _{i=0}^{n_{11}} \binom {n_{1 \cdot }}{i} \binom {n_{2 \cdot }}{n_{\cdot 1} - i} ~  \phi _2^ i ~ ~  / ~ ~  \sum _{i=0}^{n_{\cdot 1}} \binom {n_{1 \cdot }}{i} \binom {n_{2 \cdot }}{n_{\cdot 1} - i} ~  \phi _2^ i ~   $
$\displaystyle  =  $
$\displaystyle  ~  \alpha /2  $

When the odds ratio equals zero, which occurs when either $n_{11} = 0$ or $n_{22} = 0$, PROC FREQ sets the lower exact confidence limit to zero and determines the upper limit with level $\alpha $. Similarly, when the odds ratio equals infinity, which occurs when either $n_{12} = 0$ or $n_{21} = 0$, PROC FREQ sets the upper exact confidence limit to infinity and determines the lower limit with level $\alpha $.

Relative Risks (Cohort Studies)

These measures of relative risk are useful in cohort (prospective) study designs, where two samples are identified based on the presence or absence of an explanatory factor. The two samples are observed in future time for the binary (yes-no) response variable under study. Relative risk measures are also useful in cross-sectional studies, where two variables are observed simultaneously. See Stokes, Davis, and Koch (2012) and Agresti (2007) for more information.

The column 1 relative risk is the ratio of the column 1 risk for row 1 to row 2. The column 1 risk for row 1 is the proportion of the row 1 observations classified in column 1,

\[  p_1 = n_{11} ~  / ~  n_{1 \cdot }  \]

Similarly, the column 1 risk for row 2 is

\[  p_2 = n_{21} ~  / ~  n_{2 \cdot }  \]

The column 1 relative risk is computed as

\[  \mathit{RR}_1 = p_1 ~  / ~  p_2  \]

A relative risk greater than 1 indicates that the probability of positive response is greater in row 1 than in row 2. Similarly, a relative risk less than 1 indicates that the probability of positive response is less in row 1 than in row 2. The strength of association increases with the deviation from 1.

Asymptotic $100(1-\alpha )$% confidence limits for the column 1 relative risk are computed as

\[  \left( ~  \mathit{RR}_1 \times \exp ( -z \sqrt {v} ) , ~ ~  \mathit{RR}_1 \times \exp ( z \sqrt {v} ) ~  \right)  \]

where

\[  v = \mr {Var} (\ln \mathit{RR}_1) = \bigl ( (1-p_1) / n_{11} \bigr ) ~  + ~  \bigl ( (1-p_2) / n_{21} \bigr )  \]

and z is the $100(1-\alpha /2)$ percentile of the standard normal distribution. If either $n_{11}$ or $n_{21}$ is zero, the estimates are not computed.

PROC FREQ computes the column 2 relative risks in the same way.

Exact Unconditional Confidence Limits for the Relative Risk

If you specify the RELRISK option in the EXACT statement, PROC FREQ provides exact unconditional confidence limits for the relative risk. PROC FREQ computes the confidence limits by inverting two separate one-sided tests (tail method), where the size of each test is at most $\alpha /2$ and the confidence coefficient is at least $(1-\alpha )$. Exact conditional methods, described in the section Exact Statistics, do not apply to the relative risk due to the presence of a nuisance parameter (Agresti, 1992). The unconditional approach eliminates the nuisance parameter by maximizing the p-value over all possible values of the parameter (Santner and Snell, 1980).

By default, PROC FREQ uses the unstandardized relative risk as the test statistic in the confidence limit computations. If you specify the RELRISK(METHOD=SCORE) option, the procedure uses the relative risk score statistic (Chan and Zhang, 1999). The score statistic is a less discrete statistic than the raw relative risk and produces less conservative confidence limits (Agresti and Min, 2001). See also Santner et al. (2007) for comparisons of methods for computing exact confidence limits.

See the section Exact Unconditional Confidence Limits for the Risk Difference for a description of the method that PROC FREQ uses to compute confidence limits for the relative risk. The test statistic for the relative risk computation is either the unstandardized relative risk (by default) or the relative risk score statistic (if you specify the RELRISK(METHOD=SCORE) option). PROC FREQ uses the following form of the unstandardized relative risk, which adds 0.05 to each frequency, to ensure that the statistic is defined when there are zero table cells (Gart and Nam, 1988):

\[  \mathit{rr} = \frac{ (n_{11} + 0.5) ~  / ~  ( n_{1 \cdot } + 0.5 ) }{ (n_{21} + 0.5) ~  / ~  ( n_{2 \cdot } + 0.5 ) }  \]

If you specify the RELRISK(METHOD=SCORE) option, PROC FREQ uses the relative risk score statistic (Miettinen and Nurminen, 1985; Farrington and Manning, 1990). This test statistic is computed as

\[  z = ( \hat{p_1} - R_0 \hat{p_2} ) ~  / ~  \mr {se}(\mathit{rr})  \]

where

\[  \mr {se}(\mathit{rr}) = \sqrt { \tilde{p}_1 (1-\tilde{p}_1) / n_{1 \cdot } ~ +~  R_0^2 ~  \tilde{p}_2 (1-\tilde{p}_2) / n_{2 \cdot } }  \]

where $\tilde{p}_1$ and $\tilde{p}_2$ are the maximum likelihood estimators of $p_1$ and $p_2$ under the null hypothesis that the relative risk equals $R_0$. From Farrington and Manning (1990, p. 1454), the maximum likelihood solution is

\[  \tilde{p}_1 = ( -b - \sqrt {b^2 - 4ac} ) / 2a \hspace{.15in} \mr {and} \hspace{.15in} \tilde{p}_2 = \tilde{p}_1 / R_0  \]

where

$\displaystyle  a  $
$\displaystyle  =  $
$\displaystyle  1 + \theta  $
$\displaystyle b  $
$\displaystyle  =  $
$\displaystyle  - \left( R_0 ( 1 + \theta \hat{p}_2 ) + \theta + \hat{p}_1 \right)  $
$\displaystyle c  $
$\displaystyle  =  $
$\displaystyle  R_0 ( \hat{p}_1 + \theta \hat{p}_2 )  $
$\displaystyle \theta  $
$\displaystyle  =  $
$\displaystyle  n_{2 \cdot } / n_{1 \cdot }  $