ci2ms {gap} | R Documentation |
Effect size and standard error from confidence interval
Description
Effect size and standard error from confidence interval
Usage
ci2ms(ci, logscale = TRUE, alpha = 0.05)
Arguments
ci |
confidence interval (CI). The delimiter between lower and upper limit is either a hyphen (-) or en dash (–). |
logscale |
a flag indicating the confidence interval is based on a log-scale. |
alpha |
Type 1 error. |
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 ).
Let
with cutoff point
, confidence limits
L
, U
in a CI are defined as follows,
,
. Consequently,
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, ,
.
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.
Examples
# rs3784099 and breast cancer recurrence/mortality
ms <- ci2ms("1.28-1.72")
print(ms)
# Vector input
ci2 <- c("1.28-1.72","1.25-1.64")
ms2 <- ci2ms(ci2)
print(ms2)