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) [[alternative HTML version deleted]]
Viechtbauer, Wolfgang (SP)
2019-Feb-25 19:34 UTC
[R] differences between meat and metafor packages
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-bounces at 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)
Viechtbauer, Wolfgang (SP)
2019-Feb-27 11:42 UTC
[R] differences between meat and metafor packages
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.hholly at 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.viechtbauer at 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-bounces at 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)
H? Wolfgang? I do appreciate for this info. Very helpful. And I do apologize for the personal email. It was done mistakenly. Regards, Greg On Wed, Feb 27, 2019 at 5:42 AM Viechtbauer, Wolfgang (SP) < wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:> 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.hholly at 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.viechtbauer at 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-bounces at 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) >[[alternative HTML version deleted]]