m1 <- c(45.1, 39.2, 36.3, 34.5)
m2 <- c(30.0, 35.1, 35.3, 36.2)
sd1 <- c(10.7, 10.5, 9.4, 11.5)
sd2 <- c(12.3, 12.0, 10.4, 9.6)
n1 <- c(40, 20, 50, 25)
n2 <- c(40, 20, 48, 26)
group <- c(1, 1, 2, 2)
meta.sub.pbcor(.05, m1, m2, sd1, sd2, n1, n2, 2, group)
# Should return:
# Estimate SE LL UL
# Set A: 0.36338772 0.08552728 0.1854777 0.5182304
# Set B: -0.01480511 0.08741322 -0.1840491 0.1552914
# Set A - Set B: 0.37819284 0.12229467 0.1320530 0.6075828
Run the code above in your browser using DataLab