Hi Greg, Please cc the mailing list when responding.
No, this is not correct. The argument 'vi' is for the *variances*, not the standard errors. So, either use: res <- rma(HR, sei=SE, data=a, method="REML", slab=paste(a$study), digits=3) or res <- rma(HR, vi=SE^2, data=a, method="REML", slab=paste(a$study), digits=3) Best, Wolfgang -----Original Message----- From: greg holly [mailto:mak.hho...@gmail.com] Sent: Monday, 25 February, 2019 21:20 To: Viechtbauer, Wolfgang (SP) Subject: Re: [R] differences between meat and metafor packages Hi Wolfgang; Thanks so much for this. It is much appreciated. Essentially, I run the following with metafor. Is not this correct? Still, should I specify sei in program? Regards, Greg. ### Spesify log hazard ratios and sampling variances a$yi <- a$HR a$vi <- a$SE ### meta-analysis based on all trials res <- rma(yi, vi, data=a, method="REML", slab=paste(a$study), digits=3) On Mon, Feb 25, 2019 at 1:34 PM Viechtbauer, Wolfgang (SP) <wolfgang.viechtba...@maastrichtuniversity.nl> wrote: The second argument (called 'vi') in rma() is for the variances. If you have SEs, then use the 'sei' argument: res <- rma(HR, sei=SE, data=a) Best, Wolfgang -----Original Message----- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of greg holly Sent: Monday, 25 February, 2019 18:40 To: r-help mailing list Subject: [R] differences between meat and metafor packages Hi all; I have got different results (CI and Q value for heterogeneity, tau) on the same data when I run meta and metafor for hazard ratio with a random effects model. The basic programs for both are given below. What can cause? Regards, Greg Metafor res <- rma(HR, SE, data=a) predict(res, transf=exp) Meta metagen(HR, SE, sm="HR", data=a) ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.