# NOT RUN {
### copy data into 'dat'
dat <- dat.molloy2014
### calculate r-to-z transformed correlations and corresponding sampling variances
dat <- escalc(measure="ZCOR", ri=ri, ni=ni, data=dat, slab=paste(authors, year, sep=", "))
dat
### meta-analysis of the transformed correlations using a random-effects model
res <- rma(yi, vi, data=dat)
res
### average correlation with 95% CI
predict(res, digits=3, transf=transf.ztor)
### forest plot
forest(res, addpred=TRUE, xlim=c(-1.6,1.6), atransf=transf.ztor,
at=transf.rtoz(c(-.4,-.2,0,.2,.4,.6)), digits=c(2,1), cex=.8,
header="Author(s), Year")
### funnel plot
funnel(res)
# }
Run the code above in your browser using DataLab