### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
### fit mixed-effects model with absolute latitude and publication year as moderators
res <- rma(yi, vi, mods = ~ ablat + year, data=dat)
### carry out permutation test
if (FALSE) {
set.seed(1234) # for reproducibility
sav <- permutest(res)
coef(sav)
}
Run the code above in your browser using DataLab