**** Stata do file for meta-analysis of antiplatelet therapy for prevention of stroke ********** /* See http://www.gllamm.org/bayes.html Reference: Chung, Y., Rabe-Hesketh, S. and Choi, I.-H. (2013). Avoiding zero between-study variance estimates in random-effects meta-analysis. Statistics in Medicine 32, 4071-4089. */ * Install software (if needed) ssc install gllamm, replace * download init_prior and calc_prior from http://www.gllamm.org/bayes.html ssc install metaan, replace * Load data (from http://www.gllamm.org/bayes.html) use antiplatelet * Calculate odds ratios and standard errrors generate at = nt-dt generate ac = nc-dc generate or = (dt/at)/ (dc/ac) generate lnor = ln(or) generate seor = sqrt(1/dt+1/at+1/dc+1/ac) generate id=_n * ML (Section 2.2) metaan lnor seor, ml eq het: seor constr def 1 [s1]seor=1 gllamm lnor, i(id) s(het) nats constr(1) adapt eform * REML (Section 2.2) metaan lnor seor, reml * BM (Section 7) eq het: seor constr def 1 [s1]seor=1 gllamm lnor, i(id) s(het) nats constr(1) adapt /// eform prior(gamma, scale(10000) shape(2))