R/meta_ave.R
meta.ave.prop.ps.Rd
Computes the estimate, standard error, and confidence interval for an average proportion difference from two or more studies.
meta.ave.prop.ps(alpha, f11, f12, f21, f22, bystudy = TRUE)
alpha level for 1-alpha confidence
vector of frequency counts in cell 1,1
vector of frequency counts in cell 1,2
vector of frequency counts in cell 2,1
vector of frequency counts in cell 2,2
logical to also return each study estimate (TRUE) or not
Returns a matrix. The first row is the average estimate across all studies. If bystudy is TRUE, there is 1 additional row for each study. The matrix has the following columns:
Estimate - estimated effect size
SE - standard error
LL - lower limit of the confidence interval
UL - upper limit of the confidence interval
Bonett DG, Price RM (2014). “Meta-analysis methods for risk differences.” British Journal of Mathematical and Statistical Psychology, 67(3), 371--387. ISSN 00071102, doi:10.1111/bmsp.12024 .
f11 <- c(17, 28, 19)
f12 <- c(43, 56, 49)
f21 <- c(3, 5, 5)
f22 <- c(37, 54, 39)
meta.ave.prop.ps(.05, f11, f12, f21, f22, bystudy = TRUE)
#> Estimate SE LL UL
#> Average 0.3809573 0.03000016 0.3221581 0.4397565
#> Study 1 0.3921569 0.05573055 0.2829270 0.5013867
#> Study 2 0.3517241 0.04629537 0.2609869 0.4424614
#> Study 3 0.3859649 0.05479300 0.2785726 0.4933572
# Should return:
# Estimate SE LL UL
# Average 0.3809573 0.03000016 0.3221581 0.4397565
# Study 1 0.3921569 0.05573055 0.2829270 0.5013867
# Study 2 0.3517241 0.04629537 0.2609869 0.4424614
# Study 3 0.3859649 0.05479300 0.2785726 0.4933572