# ranktest

0th

Percentile

##### Rank Correlation Test for Funnel Plot Asymmetry

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

Keywords
htest
##### Usage
ranktest(x, …)# S3 method for rma
ranktest(x, digits, …)# S3 method for default
ranktest(x, vi, sei, subset, digits, …)
##### Arguments
x

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

vi

vector with the corresponding sampling variances.

sei

vector with the corresponding standard errors.

subset

optional vector indicating the subset of studies that should be included in the test. This can be a logical vector of the same length as x or a numeric vector indicating the indices of the observations to include. Only relevant when passing a vector via x.

digits

integer specifying the number of decimal places to which the printed results should be rounded (the default is 4).

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 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 an object of class "rma" to the function or a vector of observed effect sizes or outcomes (via x) and the corresponding sampling variances via vi (or the standard errors via sei).

##### Value

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.

##### Note

The method does not depend on the model fitted. Therefore, regardless of the model passed to the function, 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.

##### References

Begg, C. B., & Mazumdar, M. (1994). Operating characteristics of a rank correlation test for publication bias. Biometrics, 50, 1088--1101.

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

##### See Also

regtest

##### Aliases
• ranktest
• ranktest.rma
• ranktest.default
##### Examples
# NOT RUN {
### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

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

ranktest(res)
ranktest(dat$yi, dat$vi)
# }

Documentation reproduced from package metafor, version 2.0-0, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.