cvm: Cramer-von Mises test

Description Usage Arguments Value Examples

Description

generating Cram′er-von Mises test p-value,which the null hypothesis that the two samples come from the same distribution.

Usage

1
cvm(x, y, N)

Arguments

x

the sample to be tested

y

the sample to be tested

N

the number of permutation

Value

Cram′er-von Mise test p-value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
set.seed(2)
attach(chickwts)
x1 <- sort(as.vector(weight[feed == "soybean"]));
y1 <- sort(as.vector(weight[feed == "linseed"]));
cvm1<-cvm(x1,y1,999);
p1 <- mean(cvm1 >= cvm1[1]);
p1
hist(cvm1, main = "Cramer-von Mises test", freq = FALSE, xlab = "w (p = 0.385)",breaks = "scott");
points(cvm1[1], 0, cex = 1, pch = 16);

## End(Not run)

qyc1996/StatComp18003 documentation built on May 5, 2019, 11:08 p.m.