R/ddst.umbrellaknownp.test.R
ddst.umbrellaknownp.test.Rd
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).
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 )
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 |
An automatic test for the umbrella alternatives. Wylupek (2016) https://onlinelibrary.wiley.com/doi/abs/10.1111/sjos.12231
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#> #> Data Driven k-Sample Umbrella Test #> #> data: listxyz, t.p: 2.2, t.n: 2.2, p: 2 #> U.T = 412.82, p = 2 #>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#> #> Data Driven k-Sample Umbrella Test #> #> data: listx1x2x3x4x5x6x7, t.p: 2.2, t.n: 2.2, p: 3 #> U.T = 4662.7, p = 3 #>plot(t)#> #> Data Driven k-Sample Umbrella Test #> #> data: listx1x2x3x4x5x6x7, t.p: 2.2, t.n: 2.2, p: 5 #> U.T = -3101, p = 5 #>plot(t)