View source: R/covariance_and_correlation_related_functions.R

Hypothesis tests for equality of multiple covariance matrices | R Documentation |

Hypothesis tests for equality of multiple covariance matrices.

```
covlikel(x, ina, a = 0.05)
covmtest(x, ina, a = 0.05)
```

`x` |
A numerical matrix with the data whose covariance matrices will be tested for equality. |

`ina` |
A vector with the grouping variable that defines the groups. |

`a` |
The level of significance, default value is equal to 0.05. |

The likelihood-ratio test and the Box's M-test for testing equality of multiple
covariance matrices. The log-likelihood ratio test is the multivariate generalization
of Bartlett's test of homogeneity of variances. According to Mardia (1979, pg. 140),
it may be argued that if `n_i`

is small, then the log-likelihood ratio test gives
too much weight to the contribution of `\bf S`

. This consideration led Box (1949)
to propose his test statistic.

A vector with the test statistic, its p-value, the degrees of freedom and the critical value of the test.

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

Aitchison J. (2003, pg. 155). The Statistical Analysis of Compositional Data. New Jersey: (Reprinted by) The Blackburn Press.

Mardia K. V., Kent J. T. and Bibby J. M. (1979, p.g. 140). Multivariate Analysis. London: Academic Press.

` covequal, covdist, covar, cor_test `

```
x <- as.matrix(iris[, 1:4])
ina <- iris[, 5]
covlikel(x, ina)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.