if (FALSE) {
set.seed(1234)
## Distributions are equal
n <- 250
sample.A <- data.frame(x=rnorm(n))
sample.B <- data.frame(x=rnorm(n))
npdeneqtest(sample.A,sample.B,boot.num=99)
Sys.sleep(5)
## Distributions are unequal
sample.A <- data.frame(x=rnorm(n))
sample.B <- data.frame(x=rchisq(n,df=5))
npdeneqtest(sample.A,sample.B,boot.num=99)
## Mixed datatypes, distributions are equal
sample.A <- data.frame(a=rnorm(n),b=factor(rbinom(n,2,.5)))
sample.B <- data.frame(a=rnorm(n),b=factor(rbinom(n,2,.5)))
npdeneqtest(sample.A,sample.B,boot.num=99)
Sys.sleep(5)
## Mixed datatypes, distributions are unequal
sample.A <- data.frame(a=rnorm(n),b=factor(rbinom(n,2,.5)))
sample.B <- data.frame(a=rnorm(n,sd=10),b=factor(rbinom(n,2,.25)))
npdeneqtest(sample.A,sample.B,boot.num=99)
}
Run the code above in your browser using DataLab