Effect size and standard error from confidence interval
Value
Based on CI, the function provides a list containing estimates
m effect size (log(OR))
s standard error
direction a decrease/increase (-/+) sign such that
sign(m)=-1, 0, 1, is labelled "-", "0", "+", respectively as in PhenoScanner.
Details
Effect size is a measure of strength of the relationship between two variables in a population or parameter estimate of that population.
Without loss of generality, denote m and s to be the mean and standard deviation of a sample from \(N(\mu,\sigma^2)\)).
Let \(z \sim N(0,1)\) with cutoff point \(z_\alpha\), confidence limits L, U in a CI are defined as follows,
$$
\begin{aligned}
L & = m - z_\alpha s \cr
U & = m + z_\alpha s
\end{aligned}
$$
\(\Rightarrow\) \(U + L = 2 m\), \(U - L=2 z_\alpha s\). Consequently,
$$
\begin{aligned}
m & = \frac{U + L}{2} \cr
s & = \frac{U - L}{2 z_\alpha}
\end{aligned}
$$
Effect size in epidemiological studies on a binary outcome is typically reported as odds ratio from a logistic regression
or hazard ratio from a Cox regression, \(L\equiv\log(L)\), \(U\equiv\log(U)\).
Examples
# rs3784099 and breast cancer recurrence/mortality
ms <- ci2ms("1.28-1.72")
print(ms)
#> $m
#> [1] 0.3945922
#>
#> $s
#> [1] 0.07537491
#>
#> $direction
#> [1] "+"
#>
# Vector input
ci2 <- c("1.28-1.72","1.25-1.64")
ms2 <- ci2ms(ci2)
print(ms2)
#> $m
#> [1] 0.3945922 0.3589199
#>
#> $s
#> [1] 0.07537491 0.06927492
#>
#> $direction
#> [1] "+" "+"
#>