perm.test {overlapping} | R Documentation |
Permutation test on the (non-)overlapping area
Description
Perform a permutation test on the overlapping index.
Usage
perm.test( x, B = 1000,
return.distribution = FALSE, ... )
Arguments
x |
a list of numerical vectors to be compared (each vector is an element of the list). |
B |
integer, number of permutation replicates. |
return.distribution |
logical, if |
... |
options, see function |
Details
It performs a permutation test of the null hypothesis that there is no difference between the two distributions, i.e. the overlapping index (\eta
) is one, or the non-overlapping index (1-\eta = \zeta
) is zero.
Value
It returns a list containing the following components:
Zobs |
the observed values of non-overlapping index, i.e. 1- |
pval |
p-values. |
Zperm |
the permutation distributions. |
Warning
Currently, it only runs the permutation test on two groups at a time. If x
contains more than 2 elements, it performs all paired permutation tests.
Note
Call function overlap
.
Author(s)
Massimiliano Pastore
References
Perugini, A., Calignano, G., Nucci, M., Finos, L., & Pastore, M. (2024, December 30). How do my distributions differ? Significance testing for the Overlapping Index using Permutation Test. doi:10.31219/osf.io/8h4fe
Examples
set.seed(20150605)
x <- list(X1=rnorm(100), X2=rt(50,8))
## not run: this example take several minutes
## permutation test
# out <- perm.test( x, return.distribution = TRUE )
# out$pval
# plot( density( out$Zperm ) )
# abline( v = out$Zobs )
x <- list(X1=rnorm(100), X2=rt(50,8), X3=rchisq(75,3))
# out <- perm.test( x )
# out$pval