ranktest.rma {metafor} | R Documentation |
Rank correlation test for funnel plot asymmetry for objects of class "rma"
.
## S3 method for class 'rma': ranktest(x, ...)
x |
an object of class "rma" . |
... |
other arguments. |
The function carries out the rank correlation test as described by Begg and Mazumdar (1994). The test can be used to examine whether the observed outcomes and the corresponding sampling variances are correlated. A high correlation would indicate that the funnel plot is asymmetric, which may be a result of publication bias.
An object of class "ranktest.rma"
. The object is a list containing the following components:
tau |
the estimated value of Kendall's tau rank correlation coefficient |
pval |
the corresponding p-value for the test that the true tau is equal to zero |
The results are formated and printed with the print.ranktest.rma
function.
The method does not depend on the model fitted. Therefore, regardless of the model, the results of the rank test will always be the same. See regtest
for tests of funnel plot asymmetry that are based on regression models and model dependent.
The function makes use of the cor.test
function with method="kendall"
. If possible, an exact p-value is provided; otherwise, a large-sample approximation is used.
Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/
Begg, C. B. & Mazumdar, M. (1994) Operating characteristics of a rank correlation test for publication bias. Biometrics, 50, 1088–1101.
### load BCG vaccine data data(dat.bcg) ### calculate log risk ratios and corresponding sampling variances dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) dat <- cbind(dat.bcg, dat) ### random-effects model res <- rma(yi, vi, data=dat, method="REML") ranktest(res)