ddst.umbrellaknownp.test: Data Driven Smooth Test for Umbrella Alternatives; Known Peak

ddst.umbrellaknownp.testR Documentation

Data Driven Smooth Test for Umbrella Alternatives; Known Peak

Description

Performs data driven smooth test for so-called umbrella alternatives in k-sample problem. Suppose that we have random samples from k distributions F_i where i = 1, ..., k. The null hypothesis is that there is no umbrella pattern, i.e. F_1 >= ... >= F_p <= ... <= F_k and F_i != F_j for some i and j. The alternative is that there is an umbrella pattern i.e. F_1 >= ... >= F_p <= ... <= F_k and F_i != F_j for some i and j. Detailed description of the test statistic is provided in Wylupek (2016).

Usage

ddst.umbrellaknownp.test(
  x,
  p,
  r.N = rep(4, length(x) - 1),
  alpha = 0.05,
  t.p,
  t.n,
  nr = 1e+05,
  compute.cv = TRUE
)

Arguments

x

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

p

a peak of the umbrella pattern

r.N

a (p(p-1)=2+(k-p)(k-p+1)/2)-dimensional vector specifying the levels of complexity of the grids considered, only for advanced users

alpha

a significance level

t.p

an alpha-dependent (p(p-1)=2+(k-p)(k-p+1)/2)-dimensional vector of the tunning parameters in the penalties in the model selection rules T.o

t.n

an alpha-dependent (k-1)-dimensional vector of the tunning parameters in the penalties in the model selection rules T.tilde

nr

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

compute.cv

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

References

An automatic test for the umbrella alternatives. Wylupek (2016) https://onlinelibrary.wiley.com/doi/abs/10.1111/sjos.12231

Examples

set.seed(7)
# H0 is true
x = runif(80)
y = runif(80) + 0.2
z = runif(80)
t <- ddst.umbrellaknownp.test(list(x, y, z), p = 2, t.p = 2.2, t.n = 2.2)
t
plot(t)

# known fixed alternative
x1 = rnorm(80)
x2 = rnorm(80) + 2
x3 = rnorm(80) + 4
x4 = rnorm(80) + 3
x5 = rnorm(80) + 2
x6 = rnorm(80) + 1
x7 = rnorm(80)
t <- ddst.umbrellaknownp.test(list(x1, x2, x3, x4, x5, x6, x7), p = 3, t.p = 2.2, t.n = 2.2)
t
plot(t)

t <- ddst.umbrellaknownp.test(list(x1, x2, x3, x4, x5, x6, x7), p = 5, t.p = 2.2, t.n = 2.2)
t
plot(t)


pbiecek/ddst documentation built on Aug. 22, 2023, 7:44 p.m.