m1 <- c(21.9, 23.1, 19.8)
m2 <- c(16.1, 17.4, 15.0)
sd1 <- c(3.82, 3.95, 3.67)
sd2 <- c(3.21, 3.30, 3.02)
n1 <- c(40, 30, 24)
n2 <- c(40, 28, 25)
meta.ave.stdmean2(.05, m1, m2, sd1, sd2, n1, n2, 0, bystudy = TRUE)
# Should return:
# Estimate SE LL UL
# Average 1.526146 0.1734341 1.1862217 1.866071
# Study 1 1.643894 0.2629049 1.1286100 2.159178
# Study 2 1.566132 0.3056278 0.9671126 2.165152
# Study 3 1.428252 0.3289179 0.7835848 2.072919
Run the code above in your browser using DataLab