Performs data driven smooth test for the classical k-sample problem. Suppose that we have random samples from k distributions F_i where i = 1, ..., k. The null hypothesis is that F_1 = ... = F_k while the alternative is that at least two distributions are different. Detailed description of the test statistic is provided in Wylupek (2010).

ddst.ksample.test(
  x,
  d.N = 12,
  c = 2.3,
  nr = 1e+05,
  compute.p = TRUE,
  alpha = 0.05,
  compute.cv = TRUE
)

Arguments

x

a list of k (non-empty) numeric vectors of data

d.N

an integer specifying the maximum dimension considered, only for advanced users

c

a calibrating parameter in the penalty in the model selection rule

nr

an integer specifying the number of runs for a p-value and a critical value computation if any

compute.p

a logical value indicating whether to compute a p-value or not

alpha

a significance level

compute.cv

a logical value indicating whether to compute a critical value corresponding to the significance level alpha or not

References

Data-driven k-sample tests. Wylupek (2010) https://www.jstor.org/stable/40586684?seq=1

Examples

set.seed(7) # H0 is false x <- runif(80) y <- rexp(80, 1) z <- runif(80) t <- ddst.ksample.test(list(x, y, z))
#> Error in ddst.ksample.Nk(x.vector, n, d_N = d.n, c = c): object 'd.n' not found
t
#> function (x) #> UseMethod("t") #> <bytecode: 0x7fa25a157eb0> #> <environment: namespace:base>
plot(t)
# H0 is true x <- runif(80) y <- runif(80) z <- runif(80) t <- ddst.ksample.test(list(x, y, z))
#> Error in ddst.ksample.Nk(x.vector, n, d_N = d.n, c = c): object 'd.n' not found
t
#> function (x) #> UseMethod("t") #> <bytecode: 0x7fa25a157eb0> #> <environment: namespace:base>
plot(t)