# permutest

0th

Percentile

##### Permutation Tests for 'rma.uni' Objects

The function carries out permutation tests for objects of class "rma.uni".

Keywords
models
##### Usage
permutest(x, ...)
"permutest"(x, exact=FALSE, iter=1000, permci=FALSE, progbar=TRUE, retpermdist=FALSE, digits, tol, control, ...)
##### Arguments
x
an object of class "rma.uni".
exact
logical indicating whether an exact permutation test should be carried out or not (the default is FALSE). See ‘Details’.
iter
integer specifying the number of iterations for the permutation test when not doing an exact test (the default is 1000 iterations).
permci
logical indicating whether permutation-based CIs should also be calculated (the default is FALSE). Can also be a vector of indices specifying for which coefficients a permutation-based CI should be obtained.
progbar
logical indicating whether a progress bar should be shown (the default is TRUE).
retpermdist
logical indicating whether the permutation distributions of the test statistics should be returned (the default is FALSE).
digits
integer specifying the number of decimal places to which the printed results should be rounded (if unspecified, the default is to take the value from the object).
tol

When obtaining permutation-based CIs, the function makes use of uniroot. By default, the desired accuracy is set equal to .Machine$double.eps^0.25 and the maximum number of iterations to 100. The desired accuracy and the maximum number of iterations can be adjusted with the control argument (i.e., control=list(tol=value, maxiter=value)). ##### References Follmann, D. A., & Proschan, M. A. (1999). Valid inference in random effects meta-analysis. Biometrics, 55, 732--737. Good, P. I. (2009). Permutation, parametric, and bootstrap tests of hypotheses (3rd ed.). New York: Springer. Higgins, J. P. T., & Thompson, S. G. (2004). Controlling the risk of spurious findings from meta-regression. Statistics in Medicine, 23, 1663--1682. 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/. Viechtbauer, W., López-López, J. A., Sánchez-Meca, J., & Marín-Martínez, F. (2015). A comparison of procedures to test for moderators in mixed-effects meta-regression models. Psychological Methods, 20, 360--374. ##### See Also rma.uni, print.permutest.rma.uni ##### Aliases • permutest • permutest.rma.uni ##### Examples ### calculate log relative risks 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) res ### permutation test (approximate and exact) ## Not run: # permutest(res) # permutest(res, exact=TRUE)## End(Not run) ### mixed-effects model with two moderators (absolute latitude and publication year) res <- rma(yi, vi, mods = ~ ablat + year, data=dat) res ### permutation test (approximate only; exact not feasible) ## Not run: # # permres <- permutest(res, iter=10000, retpermdist=TRUE) # permres # # ### histogram of permutation distribution for absolute latitude # ### dashed horizontal line: the observed value of the test statistic # ### red curve: standard normal density # ### blue curve: kernel density estimate of the permutation distribution # ### note that the tail area under the permutation distribution is larger # ### than under a standard normal density (hence, the larger p-value) # hist(permres$zval.perm[,2], breaks=120, freq=FALSE, xlim=c(-5,5), ylim=c(0,.4),
#      main="Permutation Distribution", xlab="Value of Test Statistic", col="gray90")
# abline(v=res$zval[2], lwd=2, lty="dashed") # abline(v=0, lwd=2) # curve(dnorm, from=-5, to=5, add=TRUE, lwd=2, col=rgb(1,0,0,alpha=.7)) # lines(density(permres$zval.perm[,2]), lwd=2, col=rgb(0,0,1,alpha=.7))
# ## End(Not run)

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

### Community examples

Looks like there are no examples yet.