[R] Metafor vs Meta vs Spreadsheet: wrong numbers

Serge-Étienne Parent separent at yahoo.com
Wed Jan 12 18:18:21 CET 2011


I experimented the Metafor and Meta packages in the scope of replacing  Excel 
for meta-analysis. I performed the first working example provided  in Michael 
Borenstein's book "Introduction to Meta-Analysis" with Excel,  Metafor and Meta. 
The numbers given by my spreadsheet, which I  validated from Borenstein's book, 
conrespond quite closely to those  given by Meta, but are different from those 
obtained using Metafor. For  the fixed effect, I infer that the differences are 
related to numerical  issues, but for the random effect, the numbers are 
considerably  different. Unfortunately, I could not find where I made it wrong. 
I  would be grateful if someone would have a look at my calculations.

Here are the meta-analysis commands:

( dat<-escalc(m1i=m1i, sd1i=sd1i, n1i=n1i, m2i=m2i, sd2i=sd2i,  n2i=n2i, 
measure="SMD", data=metaData, append=T) ) # COMPUTE EFFECT SIZE
( res<-rma.uni(yi,vi,data=dat,method="HE", level=95) ) ### RANDOM EFFECT
( res<-rma.uni(yi,vi,data=dat,method="FE", level=95) )  ### FIXED EFFECT

( res<-metacont(metaData[,3], metaData[,1], metaData[,2], metaData[,6], 
metaData[,4], metaData[,5],
    level = 0.95, level.comb = 0.95,
    comb.fixed=TRUE, comb.random=TRUE,
    label.e="Experimental", label.c="Control",
    bylab=rownames(metaData)) )

The whole R script is temporarly available at http://bit.ly/eYesbZ
The spreadsheet is temporarly available at http://bit.ly/fAYWPo

Kind regards, 

S.-É. Parent, Eng., Ph.D.
Department of Soils and Agrifood Engineering, Université Laval

More information about the R-help mailing list