[R] Npmc for doing post-hoc after Kruskal

Kjetil Brinchmann Halvorsen kjetilbrinchmannhalvorsen at gmail.com
Sun Mar 5 00:34:46 CET 2006


Farrel Buchinsky wrote:
> I followed the threads that enquired about doing post-hoc tests after doing
> Kruskal testing. It took me to npmc. But npmc is giving an output I do not
> understand. 
> I noticed a thread entitled "npmc function: 'x' must be atomic" but there
> never appeared to be a resolution.
> 
>> npmc(npmcinput)
> Error in sort(unique.default(x), na.last = TRUE) : 
>         'x' must be atomic
> 
> Here is the dataframe I created and called npmcinput
> To prove that I have the data set up correctly I ran
>> kruskal.test(OtoMax~grp)
> 
>         Kruskal-Wallis rank sum test
> 
> data:  OtoMax by grp 
> Kruskal-Wallis chi-squared = 59.4028, df = 3, p-value = 7.885e-13
> 
>    grp OtoMax
> 1    1      0
> 2    1      1
> 3    1      0
> 4    1      1
> 5    1      1
> 6    1      1
> 7    1      1
> 8    1      1
> 9    1      1
> 10   1      2
> 11   1      1
> 12   1      1
> 13   1      1
> 14   1      1
> 15   1      2
> 16   1      1
> 17   1      1
> 18   1      1
> 19   1      2
> 20   1      2
> 21   1      0
> 22   1      1
> 23   1      1
> 24   1      2
> 25   1      1
> 26   1      1
> 27   1      1
> 28   1      2
> 29   3      4
> 30   3      4
> 31   3      2
> 32   3      2
> 33   3      2
> 34   3      3
> 35   3      2
> 36   3      2
> 37   3      2
> 38   3      3
> 39   3      2
> 40   3      2
> 41   3      4
> 42   3      3
> 43   3      2
> 44   3      4
> 45   3      3
> 46   3      4
> 47   3      2
> 48   3      2
> 49   3      2
> 50   3      3
> 51   3      2
> 52   3      3
> 53   3      0
> 54   3      4
> 55   3      2
> 56   3      2
> 57   2      2
> 58   2      2
> 59   2      2
> 60   2      2
> 61   2      2
> 62   2      2
> 63   2      3
> 64   2      2
> 65   2      2
> 66   2      3
> 67   2      2
> 68   2      2
> 69   2      2
> 70   2      2
> 71   2      2
> 72   2      2
> 73   2      3
> 74   2      2
> 75   2      3
> 76   2      3
> 77   2      3
> 78   2      2
> 79   2      3
> 80   2      4
> 81   2      2
> 82   2      2
> 83   2      2
> 84   2      2
> 85   0      1
> 86   0      1
> 87   0      0
> 88   0      1
> 89   0      0
> 90   0      0
> 91   0      0
> 92   0      0
> 93   0      1
> 94   0      0
> 
> Subsequently I renamed grp to be "class" and OtoMax to be "var" and
> everything seemed to work.
> Is that really the way one has to do it? As a general pointer to my overall
> R capabilities- does the documentation say that one has to name them class
> and var? 

Yes, the documentation says so!

It is easier to help if you can post your example data in a way which 
can be cut&pasted into R, for instance by using dput and posting the result.

Kjetil


Has my e-mail transgressed R etiquette?

Don't think so --- except for the missing output from dput()!

> 
> Farrel Buchinsky, MD --- Mobile (412) 779-1073
> Pediatric Otolaryngologist
> Allegheny General Hospital
> Pittsburgh, PA 
> 
> 
> 
> **********************************************************************
> This email and any files transmitted with it are confidentia...{{dropped}}
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>




More information about the R-help mailing list