pair.wmw.test {robustrank}R Documentation

WMW test for paired data

Description

Performs a WMW-type test of the strong null for paired data.

Usage

pair.wmw.test(X, Y, alternative = c("two.sided", "less", "greater"),
 correct = TRUE, perm = NULL, mc.rep = 10000, method =
 c("exact.2", "large.0", "large", "exact", "exact.0",
 "exact.1", "exact.3"), verbose = FALSE, mode =
 c("test", "var"), p.method = NULL, useC = TRUE)

Arguments

X

Sample 1.

Y

Sample 2.

alternative

Alternative hypothesis.

correct

Whether to apply continuity correction.

perm

Whether to use permutation distribution or normal approximation to find p-value. See details.

mc.rep

Number of Monte Carlo replicates for permutation test.

method

Choices of test statistics.

verbose

Print debug message when positive.

mode

For development used.

useC

For development used.

p.method

Method for obtaining p values.

Details

When perm is NULL, if (min(m,n)>=20) normal approximatino is used to find p value, otherwise permutation test is used. When permutation test is used, if the number of possible permutations is less than mc.rep, a test statistic is computed for all permutations; otherwise, Monte Carlo is done.

Value

P value for now.

References

Under prep.

Examples


dat=sim.partially.matched(m=15,n.x=0,n.y=20,distr="mixnormal",params=c(p.1=0.3,p.2=0.3),seed=1)
X=dat$X; Y=dat$Y
pair.wmw.test(X, Y, perm=TRUE,  method="large.0", verbose=1)
pair.wmw.test(X, Y, perm=FALSE, method="large.0", verbose=1)


[Package robustrank version 2024.1-28 Index]