thanks, this is essentially merging bin and species into a single variable. I was more interested in knowing if boxM can run on multiple classes directly...
On Tue, Jan 4, 2022 at 12:34 PM PIKAL Petr <petr.pi...@precheza.cz> wrote: > > Hi. > > Not sure if statistically correct but what about > > iris$int<- interaction(iris$bin, iris$Species) > boxM(iris[,1:4], iris[,7]) > > Cheers > Petr > > > -----Original Message----- > > From: R-help <r-help-boun...@r-project.org> On Behalf Of Luigi Marongiu > > Sent: Tuesday, January 4, 2022 11:56 AM > > To: r-help <r-help@r-project.org> > > Subject: [R] how to run r biotools boxM terst on multiple groups? > > > > I have a data frame containing a half dozen continuous measurements and > > over a dozen ordinal variables (such as, death, fever, symptoms etc). > > I would like to run a box matrix test and I am using biotools' boxM, but > it > > allows to run only one ordinal group at the time. For instance: > > ``` > > >data(iris) > > >boxM(iris[,1:4], iris[,5]) > > > > Box's M-test for Homogeneity of Covariance Matrices > > > > data: iris[, 1:4] > > Chi-Sq (approx.) = 140.94, df = 20, p-value < 2.2e-16 > > > > >bins <- c(1,2); iris$bin <- findInterval(iris$Petal.Width, bins) > > >iris$bin = factor(iris$bin) boxM(iris[,1:4], iris[,6]) > > > > Box's M-test for Homogeneity of Covariance Matrices > > > > data: iris[, 1:4] > > Chi-Sq (approx.) = 140.94, df = 20, p-value < 2.2e-16 > > > > >boxM(iris[,1:4], iris[,5:6]) > > Error in boxM(iris[, 1:4], iris[, 5:6]) : incompatible dimensions! > > ``` > > Is there a way to check for equality of variance-covariance on multiple > groups > > simultaneously? > > Thanks > > > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide http://www.R-project.org/posting- > > guide.html > > and provide commented, minimal, self-contained, reproducible code. -- Best regards, Luigi ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.