mwwutestrss {RSSampling} | R Documentation |
Mann-Whitney-Wilcoxon test with RSS
Description
In this function, we introduce the RSS version of the Mann-Whitney-Wilcoxon (MWW) test.
Usage
mwwutestrss(X,Y,m,r,l,n,delta0=0,alpha=0.05,lambda=0.5,alternative="two.sided")
Arguments
X |
First obtained ranked set sample |
Y |
Second obtained ranked set sample |
m |
Set size which was used while sampling X |
r |
Cycles size which was used while sampling X |
l |
Set size which was used while sampling Y |
n |
Cycles size which was used while sampling Y |
delta0 |
The median value of difference in the null hypothesis. (By Default = 0) |
alpha |
The significance level (by default = 0.05). |
lambda |
constant in the variance formula of the test statistic, see Chen et. al.(2003) |
alternative |
Character string defining the alternative hypothesis, one of "two.sided", "less" or "greater" (by default = "two.sided") |
Details
The test statistics and an approximate confidence intervals are constructed by using the normal approximation. Also note that, we assume that the ranking mechanism in the RSS is consistent. For more details please refer to Chen et. al.(2003, pg. 115-124).
There should be two datasets to compare as "X" and "Y", respectively.
Value
medianX |
median value of the first sample |
medianY |
median value of the second sample |
MWW.test.mwwUrss |
The value of the Mann-Whitney-Wilcoxon test statistic |
C.I. |
the confidence interval of the Mann-Whitney-Wilcoxon test statistic |
z.test |
the z statistic for test |
p.value |
the p value for the test |
References
Chen, Z., Bai Z., Sinha B. K. (2003). Ranked Set Sampling: Theory and Application. New York: Springer.
Examples
library("LearnBayes")
mu=c(1,1.2,2)
Sigma <- matrix(c(1,2,0,2,5,0.5,0,0.5,3), 3, 3)
x <- rmnorm(10000, mu, Sigma)
xx=as.numeric(x[,1])
xy=as.numeric(x[,2])
samplerss=con.rss(xx,xy,m=3,r=12,concomitant=TRUE)
sample.x=as.numeric(samplerss$sample.x)
sample.y=as.numeric(samplerss$sample.y)
mwwutestrss(sample.x,sample.y,m=3,r=12,l=3,n=12,delta0=0)