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.pbcor(.05, m1, m2, sd1, sd2, n1, n2, 2, bystudy = TRUE)
# Should return:
# Estimate SE LL UL
# Average 0.6159094 0.04363432 0.5230976 0.6942842
# Study 1 0.6349786 0.06316796 0.4842098 0.7370220
# Study 2 0.6160553 0.07776700 0.4255342 0.7380898
# Study 3 0.5966942 0.08424778 0.3903883 0.7283966
Run the code above in your browser using DataLab