metafor (version 3.4-0)

ranktest: Rank Correlation Test for Funnel Plot Asymmetry

Description

The function can be used to carry out the rank correlation test for funnel plot asymmetry.

Usage

ranktest(x, vi, sei, subset, data, digits, ...)

Value

An object of class "ranktest". 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 value is equal to zero.

The results are formatted and printed with the print function.

Arguments

x

a vector with the observed effect sizes or outcomes or an object of class "rma".

vi

vector with the corresponding sampling variances (ignored if x is an object of class "rma").

sei

vector with the corresponding standard errors (note: only one of the two, vi or sei, needs to be specified).

subset

optional (logical or numeric) vector to specify the subset of studies that should be included in the test (ignored if x is an object of class "rma").

data

optional data frame containing the variables given to the arguments above.

digits

optional integer to specify the number of decimal places to which the printed results should be rounded.

...

other arguments.

Details

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 effect sizes or 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.

One can either pass a vector with the observed effect sizes or outcomes (via x) and the corresponding sampling variances via vi (or the standard errors via sei) to the function or an object of class "rma".

References

Begg, C. B., & Mazumdar, M. (1994). Operating characteristics of a rank correlation test for publication bias. Biometrics, 50(4), 1088--1101. https://doi.org/10.2307/2533446

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. https://doi.org/10.18637/jss.v036.i03

See Also

regtest for the regression test, trimfill for the trim and fill method, tes for the test of excess significance, and selmodel for selection models.

Examples

Run this code
### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### fit random-effects model
res <- rma(yi, vi, data=dat)

### carry out the rank correlation test
ranktest(res)

### can also pass the observed outcomes and corresponding sampling variances to the function
ranktest(yi, vi, data=dat)

Run the code above in your browser using DataLab