data(Fleiss1993cont)
# Do meta-analysis (common effect and random effects model)
#
meta1 <- metacont(n.psyc, mean.psyc, sd.psyc, n.cont, mean.cont, sd.cont,
data = Fleiss1993cont, studlab = paste(study, year), sm = "SMD")
# Print weights for common effect and random effects meta-analysis
#
weights(meta1)
# Do meta-analysis (only random effects model)
#
meta2 <- update(meta1, common = FALSE)
# Print weights for random effects meta-analysis
#
weights(meta2)
# Print weights for common effect and random effects meta-analysis
#
weights(meta2, common = TRUE)
Run the code above in your browser using DataLab