### load data
dat <- get(data(dat.konstantopoulos2011))
### regular random-effects model
res <- rma(yi, vi, data=dat)
res
### regular random-effects model using rma.mv()
res <- rma.mv(yi, vi, random = ~ 1 | study, data=dat)
res
### multilevel random-effects model
res <- rma.mv(yi, vi, random = list(~ 1 | district, ~ 1 | study), data=dat)
res
### profile variance components
par(mfrow=c(2,1))
profile(res, sigma2=1, xlim=c(.01,.4))
profile(res, sigma2=2, xlim=c(.01,.1))
Run the code above in your browser using DataLab