[R] Function for gruping similar variables?
Timo W
esuomikim at gmail.com
Thu Jul 8 22:39:18 CEST 2010
Does anyone have an idea on this?
On 6 Lip, 11:32, Timo W <esuomi... at gmail.com> wrote:
> Hi,
>
> I have a matrix of results of multiple 2x2 chi^2 tests, non-
> significant tests are marked as TRUE. Is there a function for grouping
> those variables in a similar way LSD.test from agricolae library does?
> I reviewed LSD.test's source but it's not helpful for me.
>
> This is my matrix:
>
> [,1] [,2] [,3] [,4] [,5] [,6] [,7]
> 1 TRUE FALSE TRUE TRUE TRUE FALSE TRUE
> 2 FALSE TRUE FALSE FALSE FALSE FALSE FALSE
> 3 TRUE FALSE FALSE FALSE TRUE FALSE FALSE
> 4 TRUE FALSE FALSE TRUE TRUE TRUE TRUE
> 5 TRUE FALSE TRUE TRUE TRUE TRUE TRUE
> 6 FALSE FALSE FALSE TRUE TRUE TRUE TRUE
> 7 TRUE FALSE FALSE TRUE TRUE TRUE TRUE
>
> And I'd like to get similar output to this (LSD.test):
>
> Groups, Treatments and means
> a oo 36.9
> a ff 36.33333
> b cc 24.4
> c fc 12.86667
>
> For example, there's a group of variables 4, 5, 6, & 7 that don't
> significantly differ from each other. Is there any _simple_ way to
> mark all of them as a group?
>
> If you have any ideas, I'd be grateful.
>
> Thanks in advance,
> Timo
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list