boxMTest | R Documentation |
The boxMTest
function performs Box's (1949) M-test for homogeneity of covariance matrices. The null hypothesis for this test is that the observed covariance matrices for the dependent variables are equal across groups.
boxMTest(object)
object |
an object of class |
None. Used for its side effect.
Box G.E.P. (1949). A general distribution theory for a class of likelihood criteria. Biometrika 36, 317-346.
data(centaurea) # remove NAs and linearly dependent characters (characters with unique contributions # can be identified by stepwise discriminant analysis.) centaurea = naMeanSubst(centaurea) centaurea = removePopulation(centaurea, populationName = c("LIP", "PREL")) centaurea = keepCharacter(centaurea, c("MLW", "ML", "IW", "LS", "IV", "MW", "MF", "AP", "IS", "LBA", "LW", "AL", "ILW", "LBS", "SFT", "CG", "IL", "LM", "ALW", "AW", "SF") ) # add a small constant to characters witch are invariant within taxa centaurea$data[ centaurea$Taxon == "hybr", "LM" ][1] = centaurea$data[ centaurea$Taxon == "hybr", "LM" ][1] + 0.000001 centaurea$data[ centaurea$Taxon == "ph", "IV" ][1] = centaurea$data[ centaurea$Taxon == "ph", "IV" ][1] + 0.000001 centaurea$data[ centaurea$Taxon == "st", "LBS"][1] = centaurea$data[ centaurea$Taxon == "st", "LBS"][1] + 0.000001 boxMTest(centaurea)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.