[R-meta] Duplicating the results of the metabin() function
@c @end|ng |rom |mb|@un|-|re|burg@de
Mon Sep 30 19:31:24 CEST 2019
The discrepancy in your calculations can be explained as follows.
By default, R function metabin() uses the Mantel-Haenszel method
(argument 'method') under the fixed effect model. Accordingly, the fixed
effect weights in 'w.fixed' come from the Mantel-Haenszel method.
However, in order to calculate Cochran's Q, the fixed effect weights
from the inverse variance method are used (which are different from the
You could use the following assignment in your code to calculate Q by hand:
weights.fixed <- 1 / result$seTE^2
weights.fixed <- update(result, method = "Inverse")$w.fixed
Best wishes, Guido
P.S. 'OR <- result$TE' should actually be 'lnOR <- result$TE' as
metabin() stores the log odds ratio instead of the odds ratio.
Dr. Guido Schwarzer
Institute of Medical Biometry and Statistics,
Faculty of Medicine and Medical Center - University of Freiburg
Postal address: Stefan-Meier-Str. 26, D-79104 Freiburg
Mail: sc using imbi.uni-freiburg.de
ORCID iD: https://orcid.org/0000-0001-6214-9087
More information about the R-sig-meta-analysis