convert_bin {pimeta} | R Documentation |
Converting binary data
Description
Converting binary outcome data to the effect size estimates and the within studies standard errors vector
Usage
convert_bin(m1, n1, m2, n2, type = c("logOR", "logRR", "RD"))
Arguments
m1 |
the number of successes in treatment group 1 |
n1 |
the number of patients in treatment group 1 |
m2 |
the number of successes in treatment group 2 |
n2 |
the number of patients in treatment group 2 |
type |
the outcome measure for binary outcome data (default = "logOR").
|
Details
This function implements methods for logarithmic odds ratio, logarithmic relative risk, and risk difference described in Hartung & Knapp (2001).
Value
-
y
: the effect size estimates vector. -
se
: the within studies standard errors vector.
References
Hartung, J., and Knapp, G. (2001). A refined method for the meta-analysis of controlled clinical trials with binary outcome. Stat Med. 20(24): 3875-3889. https://doi.org/10.1002/sim.1009
Examples
m1 <- c(15,12,29,42,14,44,14,29,10,17,38,19,21)
n1 <- c(16,16,34,56,22,54,17,58,14,26,44,29,38)
m2 <- c( 9, 1,18,31, 6,17, 7,23, 3, 6,12,22,19)
n2 <- c(16,16,34,56,22,55,15,58,15,27,45,30,38)
dat <- pimeta::convert_bin(m1, n1, m2, n2, type = "logOR")
pimeta::pima(dat$y, dat$se)