The Chacko test for order-restriction with permutation test
permChacko(x, n_perm = 1000L, verbosity = 0)
A list containing the test statistic, p-values (analytic, numeric and
tabular, when available), the number of permutations performed, the original
data and the reduced data. Use names()
and str()
on the output for more
details.
Chacko, V. J. (1963). Testing homogeneity against ordered alternatives. The Annals of Mathematical Statistics, 945-956.
Chacko, V. J. (1966). Modified chi-square test for ordered alternatives. Sankhyā: The Indian Journal of Statistics, Series B, 185-190.
ruxton221207 <- c(6, 8, 4, 7, 3)
chacko66_sec3 <- c(10L, 16L, 14L, 12L, 18L)
chacko66_sec5 <- c(12L, 14L, 18L, 16L, 22L, 20L, 18L, 24L, 26L, 30L)
permChacko(ruxton221207)
#>
#> Chacko Test for Order-restriction with Permutation Test
#>
#> Null hypothesis : p1 == p2 == p3 == p4 == p5
#> Alternative hypothesis : p1 <= p2 <= p3 <= p4 <= p5
#>
#> Test statistic (chisq_bar): 0.000000
#> p-values:
#> Analytic p-value : NA
#> Numeric p-value : 1.000000 (1000 permutations)
#> Numeric mid-p value : 0.899000 (1000 permutations)
#> Tabular p-value : 0.800000
permChacko(chacko66_sec3)
#>
#> Chacko Test for Order-restriction with Permutation Test
#>
#> Null hypothesis : p1 == p2 == p3 == p4 == p5
#> Alternative hypothesis : p1 <= p2 <= p3 <= p4 <= p5
#>
#> Test statistic (chisq_bar): 2.285714
#> p-values:
#> Analytic p-value : 0.318907
#> Numeric p-value : 0.203000 (1000 permutations)
#> Numeric mid-p value : 0.199500 (1000 permutations)
#> Tabular p-value : 0.196052
permChacko(chacko66_sec5)
#>
#> Chacko Test for Order-restriction with Permutation Test
#>
#> Null hypothesis : p1 == p2 == ... == p9 == p10
#> Alternative hypothesis : p1 <= p2 <= ... <= p9 <= p10
#>
#> Test statistic (chisq_bar): 13.500000
#> p-values:
#> Analytic p-value : 0.035748
#> Numeric p-value : 0.002000 (1000 permutations)
#> Numeric mid-p value : 0.002000 (1000 permutations)
#> Tabular p-value : 0.002294