ziw: Modified Wilcoxon rank test (ZIW) for zero-inflated data

Description Usage Arguments Value References Examples

View source: R/zi_wilcox_test.R

Description

Modified Wilcoxon rank test (ZIW) for zero-inflated data

Usage

1
ziw(x, y, perm = FALSE, perm.n = 10000)

Arguments

x

a vector of data for one group

y

a vector of data for another group

perm

use permutation to calculate the pvalue

perm.n

number of permutations used for pvalue calculation

Value

modified wilcoxon rank sum statistic and pvalue

References

Wanjie Wang, Eric Z. Chen and Hongzhe Li (2015). Rank-based tests for compositional distributions with a clump of zeros. Submitted.

Examples

1
2
3
4
5
x <- c(rep(0,5),rlnorm(20, meanlog = 0, sdlog = 1))
y <- c(rep(0,10),rlnorm(20, meanlog = 2, sdlog = 1))
ziw(x, y, perm = FALSE)
## use permutations to calculate the pvalue
ziw(x, y, perm = TRUE)

chvlyl/ZIR documentation built on Oct. 14, 2021, 12:50 a.m.