gianni lavaredo
2012-Mar-26 19:32 UTC
[R] Different result with "kruskal.test" and post-hoc analysis with Nemenyi-Damico-Wolfe-Dunn test implemented in the help page for oneway_test in the coin package that uses multcomp
Dear Researchers, Sorry for this email but I am not a statistician, and for this I have this problem to understand. Thanks in Advance for help and suggestions. Gianni I have 21 classes (00, 01, 02, 04, ....,020) with different length. I did a kruskal wall test in R with the following code kruskal.test(m.class.l, m.class.length.lf) Kruskal-Wallis rank sum test data: m.class.l and m.class.length.lf Kruskal-Wallis chi-squared = 34.2904, df = 20, p-value = 0.02423 the p-value result to be < of 0.05, and i read in different books and forum that when the medium are significative difference to apply a post-hoc test to check which classes are different. i find this code in a R help: http://stackoverflow.com/questions/2478272/kruskal-wallis-test-with-details-on-pairwise-comparisons class <- m.class.length.lf var <- m.class.l dft <- data.frame(class,var) NDWD <- oneway_test(var ~ class, data = dft, ytrafo = function(data) trafo(data, numeric_trafo = rank), xtrafo = function(data) trafo(data, factor_trafo = function(x) model.matrix(~x - 1) %*% t(contrMat(table(x), "Tukey"))), teststat = "max", distribution = approximate(B=1000)) ### global p-value print(pvalue(NDWD)) [1] 0.074 99 percent confidence interval: 0.05425181 0.09791886 ### sites (I = II) != (III = IV) at alpha = 0.01 (page 244) print(pvalue(NDWD, method = "single-step")) when I apply the code for my data for see details for each pair comparison, no class comparision is significative> prova <- pvalue(NDWD, method = "single-step") > prova.df <- data.frame(prova) > prova.df$sing <- Signif(prova.df$V1) > prova.dfV1 sing 01 - 00 1.000 ns 010 - 00 1.000 ns 011 - 00 1.000 ns 012 - 00 1.000 ns 013 - 00 1.000 ns 014 - 00 1.000 ns 015 - 00 1.000 ns 016 - 00 1.000 ns 017 - 00 0.996 ns 018 - 00 0.870 ns 019 - 00 1.000 ns 02 - 00 1.000 ns 020 - 00 0.642 ns 03 - 00 1.000 ns 04 - 00 1.000 ns 05 - 00 1.000 ns 06 - 00 1.000 ns 07 - 00 1.000 ns 08 - 00 1.000 ns 09 - 00 1.000 ns 010 - 01 1.000 ns 011 - 01 1.000 ns 012 - 01 1.000 ns 013 - 01 1.000 ns 014 - 01 1.000 ns 015 - 01 1.000 ns 016 - 01 1.000 ns 017 - 01 0.981 ns 018 - 01 0.737 ns 019 - 01 1.000 ns 02 - 01 1.000 ns 020 - 01 0.441 ns 03 - 01 1.000 ns 04 - 01 1.000 ns 05 - 01 1.000 ns 06 - 01 1.000 ns 07 - 01 1.000 ns 08 - 01 1.000 ns 09 - 01 1.000 ns 011 - 010 1.000 ns 012 - 010 1.000 ns 013 - 010 1.000 ns 014 - 010 1.000 ns 015 - 010 1.000 ns 016 - 010 1.000 ns 017 - 010 0.990 ns 018 - 010 0.774 ns 019 - 010 1.000 ns 02 - 010 1.000 ns 020 - 010 0.490 ns 03 - 010 1.000 ns 04 - 010 1.000 ns 05 - 010 1.000 ns 06 - 010 1.000 ns 07 - 010 1.000 ns 08 - 010 1.000 ns 09 - 010 1.000 ns 012 - 011 0.963 ns 013 - 011 1.000 ns 014 - 011 1.000 ns 015 - 011 1.000 ns 016 - 011 0.993 ns 017 - 011 0.673 ns 018 - 011 0.226 ns 019 - 011 0.869 ns 02 - 011 1.000 ns 020 - 011 0.074 ns 03 - 011 1.000 ns 04 - 011 1.000 ns 05 - 011 1.000 ns 06 - 011 1.000 ns 07 - 011 1.000 ns 08 - 011 1.000 ns 09 - 011 1.000 ns 013 - 012 1.000 ns 014 - 012 1.000 ns 015 - 012 1.000 ns 016 - 012 1.000 ns 017 - 012 1.000 ns 018 - 012 1.000 ns 019 - 012 1.000 ns 02 - 012 1.000 ns 020 - 012 1.000 ns 03 - 012 1.000 ns 04 - 012 0.991 ns 05 - 012 1.000 ns 06 - 012 1.000 ns 07 - 012 1.000 ns 08 - 012 0.995 ns 09 - 012 1.000 ns 014 - 013 1.000 ns 015 - 013 1.000 ns 016 - 013 1.000 ns 017 - 013 0.976 ns 018 - 013 0.707 ns 019 - 013 1.000 ns 02 - 013 1.000 ns 020 - 013 0.395 ns 03 - 013 1.000 ns 04 - 013 1.000 ns 05 - 013 1.000 ns 06 - 013 1.000 ns 07 - 013 1.000 ns 08 - 013 1.000 ns 09 - 013 1.000 ns 015 - 014 1.000 ns 016 - 014 1.000 ns 017 - 014 0.995 ns 018 - 014 0.839 ns 019 - 014 1.000 ns 02 - 014 1.000 ns 020 - 014 0.560 ns 03 - 014 1.000 ns 04 - 014 1.000 ns 05 - 014 1.000 ns 06 - 014 1.000 ns 07 - 014 1.000 ns 08 - 014 1.000 ns 09 - 014 1.000 ns 016 - 015 1.000 ns 017 - 015 0.978 ns 018 - 015 0.704 ns 019 - 015 1.000 ns 02 - 015 1.000 ns 020 - 015 0.383 ns 03 - 015 1.000 ns 04 - 015 1.000 ns 05 - 015 1.000 ns 06 - 015 1.000 ns 07 - 015 1.000 ns 08 - 015 1.000 ns 09 - 015 1.000 ns 017 - 016 1.000 ns 018 - 016 1.000 ns 019 - 016 1.000 ns 02 - 016 1.000 ns 020 - 016 0.992 ns 03 - 016 1.000 ns 04 - 016 1.000 ns 05 - 016 1.000 ns 06 - 016 1.000 ns 07 - 016 1.000 ns 08 - 016 1.000 ns 09 - 016 1.000 ns 018 - 017 1.000 ns 019 - 017 1.000 ns 02 - 017 1.000 ns 020 - 017 1.000 ns 03 - 017 0.916 ns 04 - 017 0.785 ns 05 - 017 0.999 ns 06 - 017 0.994 ns 07 - 017 1.000 ns 08 - 017 0.852 ns 09 - 017 0.994 ns 019 - 018 1.000 ns 02 - 018 0.905 ns 020 - 018 1.000 ns 03 - 018 0.536 ns 04 - 018 0.329 ns 05 - 018 0.883 ns 06 - 018 0.821 ns 07 - 018 0.914 ns 08 - 018 0.442 ns 09 - 018 0.798 ns 02 - 019 1.000 ns 020 - 019 0.981 ns 03 - 019 0.993 ns 04 - 019 0.952 ns 05 - 019 1.000 ns 06 - 019 1.000 ns 07 - 019 1.000 ns 08 - 019 0.978 ns 09 - 019 1.000 ns 020 - 02 0.677 ns 03 - 02 1.000 ns 04 - 02 1.000 ns 05 - 02 1.000 ns 06 - 02 1.000 ns 07 - 02 1.000 ns 08 - 02 1.000 ns 09 - 02 1.000 ns 03 - 020 0.229 ns 04 - 020 0.118 ns 05 - 020 0.647 ns 06 - 020 0.544 ns 07 - 020 0.678 ns 08 - 020 0.166 ns 09 - 020 0.496 ns 04 - 03 1.000 ns 05 - 03 1.000 ns 06 - 03 1.000 ns 07 - 03 1.000 ns 08 - 03 1.000 ns 09 - 03 1.000 ns 05 - 04 1.000 ns 06 - 04 1.000 ns 07 - 04 1.000 ns 08 - 04 1.000 ns 09 - 04 1.000 ns 06 - 05 1.000 ns 07 - 05 1.000 ns 08 - 05 1.000 ns 09 - 05 1.000 ns 07 - 06 1.000 ns 08 - 06 1.000 ns 09 - 06 1.000 ns 08 - 07 1.000 ns 09 - 07 1.000 ns 09 - 08 1.000 ns [[alternative HTML version deleted]]
Seemingly Similar Threads
- Unexpected results using the oneway_test in the coin package
- Eliminating 'Unprintable ASCII' characters
- Asterisk 1.8.28-cert3, 1.8.32.1, 11.6-cert8, 11.14.1, 12.7.1, 13.0.1 Now Available (Security Release)
- Asterisk 1.8.28-cert3, 1.8.32.1, 11.6-cert8, 11.14.1, 12.7.1, 13.0.1 Now Available (Security Release)
- Nemenyi test as a post-hoc test to Kruskal Wallis