[R] differences between meat and metafor packages
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed Feb 27 12:42:24 CET 2019
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 using 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 using 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 using 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)
More information about the R-help
mailing list