Variance of log-odds-ratio
Note: This section contains notes on the derivations made while authoring my book. The derivation details originate from public Q&A platforms and will naturally differ from those in the book chapters.
Column 1 | Column 2 | Total | |
---|---|---|---|
Row 1 | \(a\) | \(b\) | \(n_{1\cdot}=a+b\) |
Row 2 | \(c\) | \(d\) | \(n_{2\cdot}=c+d\) |
Total | \(n_{\cdot 1}\) | \(n_{\cdot 2}\) | \(N\) |
The goal is to approximate the variance of log odds-ratio \(VAR[ln(OR)]\) when \(OR\) is expressed as \[ OR=\frac{p_1/(1-p_1)}{p_2/(1-p_2)} \] where \(p_1\) and \(p_2\) are two probabilities for group 1 and group 2, respectively.
Suppose \(Y=f(X)\), then we can use delta method to approximate the \(f(X)\) if \(E(X)=\mu\), as \[ f(X)\approx f(\mu)+f'(\mu)(X-\mu)+\frac{1}{2}f''(\mu)(X-\mu)^2 \] Assume \(VAR(X)=\sigma^2\), we have \[ \begin{gather*} E(Y)\approx E(f(X))=f(\mu)+\frac{1}{2}f''(\mu)\sigma^2\\ VAR(Y)=VAR[f(x)]\approx [f'(\mu)]^2VAR(X) \end{gather*} \]
Note, if \(E[Y]=E[f(X)]\) can be obtained using transformed density function, then delta method is not needed in approximating the \(Y=f(X)\)
Let \(Y=ln(\hat{OR})\); since group 1 and group 2 are independent, we have \[ \begin{gather*} VAR(ln(\hat{OR}))=VAR[ln(\frac{\hat{p}_1/(1-\hat{p}_1)}{\hat{p}_2/(1-\hat{p}_2)})]\\ =VAR[ln(\frac{\hat{p}_1}{1-\hat{p}_1})]+VAR[ln(\frac{\hat{p}_2}{1-\hat{p}_2})]\\ =(\frac{1}{\hat{p}_1(1-\hat{p}_1)})^2\frac{\hat{p}_1(1-\hat{p}_1)}{n_{1\cdot}}+(\frac{1}{\hat{p}_2(1-\hat{p}_2)})^2\frac{\hat{p}_2(1-\hat{p}_2)}{n_{2\cdot}}\\ =\frac{1}{n_{1\cdot}\hat{p}_1(1-\hat{p}_1)}+\frac{1}{n_{2\cdot}\hat{p}_2(1-\hat{p}_2)}\\ =\frac{1}{n_{1\cdot}\hat{p}_1}+\frac{1}{n_{1\cdot}(1-\hat{p}_1)}+\frac{1}{n_{2\cdot}\hat{p}_2}+\frac{1}{n_{2\cdot}(1-\hat{p}_2)}\\ =\frac{1}{a}+\frac{1}{b}+\frac{1}{c}+\frac{1}{d} \end{gather*} \] Where \(n_{1\cdot},n_{2\cdot}\) are counts for group 1 and group 2, respectively; \(a,b,c,d\) are 4 counts for the \(2\times 2\) contingency table.