# How can I calculate variance of log Odds Ratio if Odds Ratio extracted from the study is pre-calculated?

I want to conduct a meta-analysis using odds ratio as my metric. The studies I am using provided pre-calculated odds ratios only, along with their confidence intervals and/or standard error. I need variance of log odds ratio in order to conduct the analysis; however, I am unsure how to extract it. Can anybody help please?

Thanks.

• step 1: Log transform the CI, the log of the reported odd ratio should be the midpoint. step 2: Calculate the interval half-width. This length is the 1-alpha/2 z-score times the SE of the log odds ratio. Jun 30 at 20:06

Chapter 6 of the Cochrane Handbook for Systematic Reviews of Interventions explains how to proceed in such cases. Sections 6.3.1 and 6.3.2 are especially relevant to your situation.

If the authors provide standard errors, I strongly suspect that they are for the log-odds ratio and not the odds ratio, as standard errors for the odds ratio are problematic. Typically, a logistic regression model reports such standard errors on the log-odds scale (see example below).

If the authors provide a confidence interval for the odds ratio, you can approximate the standard error using the following formulae. Denote the point estimate of the odds ratio as $$OR$$ and $$L$$ and $$U$$ the lower and upper limits of a $$(1-\alpha)\%$$-confidence interval for the odds ratio (e.g. a $$95\%$$-confidence interval). Further, denote the $$1-\alpha/2$$-quantile of the standard normal distribution as $$z_{1-\alpha/2}$$. A $$(1-\alpha)\%$$ Wald confidence interval for the odds ratio is:

\begin{align*} \log(OR) + z_{1-\alpha/2}\times \operatorname{SE}(\log(OR)) &= \log(U)\\ \log(OR) - z_{1-\alpha/2}\times \operatorname{SE}(\log(OR)) &= \log(L) \end{align*}

Rearranging the formulae, we can get the (approximate) standard error for the log-odds ratio as follows:

\begin{align*} \operatorname{SE}(\log(OR)) &= \frac{\log(U) - \log(OR)}{z_{1-\alpha/2}}\\ \operatorname{SE}(\log(OR)) &= \frac{\log(OR) - \log(L)}{z_{1-\alpha/2}}\\ \operatorname{SE}(\log(OR)) &= \frac{\log(U) - \log(L)}{2z_{1-\alpha/2}} \end{align*}

The standard error can also be calculated from the $$P$$-value. Denote $$\Phi^{-1}(p/2)$$ the standard normal quantile corresponding to a two-sided $$P$$-value of $$p$$. The standard error can then be calculated using the following equation:

$$\operatorname{SE}(\log(OR)) = \left|\frac{\log(OR)}{\Phi^{-1}(p/2)}\right|$$

Let's try it using an example in R using artificially generated data. Here, I generate only one continuous predictor x with a log-odds ratio of $$5/21$$:

# Sample size
n <- 20

# Generate data
set.seed(142857)
x <- runif(n, 18, 60)
z <- -(65/7) + (5/21)*x
pr <- 1/(1 + exp(-z))
y <- rbinom(n, 1, pr)

dat <- data.frame(y = y, x = x)

# Calculate logistic regression model
summary(mod <- glm(y~x, family = binomial))

Estimate Std. Error z value Pr(>|z|)
(Intercept) -7.62463    3.13999  -2.428   0.0152 *
x            0.20233    0.09059   2.234   0.0255 *

# Wald 95%-confidence intervals
confint.default(mod, level = 0.95)

2.5 %     97.5 %
(Intercept) -13.77890599 -1.4703548
x             0.02478875  0.3798772


The logistic regression reports the results on the log-odds scale. Accordingly, we have $$\log(OR) = 0.20233, \log(L) = 0.0248, \log(U) = 0.3799, P = 0.0255$$. As we have calculated $$95\%$$-confidence interval, we have $$z_{1-\alpha/2} \approx 1.96$$. Also, from the two-sided $$P$$-value of $$0.0255$$ we get $$\Phi^{-1}(p/2)=\Phi^{-1}(0.0255/2) = -2.234$$. Plugging those values into the formulae above, we get:

\begin{align*} \operatorname{SE}(\log(OR)) &= \frac{0.3799 - 0.20233}{1.96} = 0.0906\\ \operatorname{SE}(\log(OR)) &= \frac{0.20233 - 0.0248}{1.96} = 0.0906\\ \operatorname{SE}(\log(OR)) &= \frac{0.3799 - 0.0248}{3.92} = 0.0906\\ \operatorname{SE}(\log(OR)) &= \left|\frac{0.20233}{-2.234}\right| = 0.0906 \end{align*}

All methods recover the standard error which is $$0.09059$$ in the output.