covTestR is an equality of covariance testing suite. Currently only equality of 2 and k group tests are available for high dimensional data. There are future plans for one sample tests for high dimensinal data, pretty print methods, and a wrapper function just to test.
In developing covTests we found it useful to have it play nice with the “tidyverse.” At this point we have not thought of all the uses and combinations with these packages so if you think of something not currently implemented please file a minimal reproducible example on github.
You can install the latest development version from github with
if (packageVersion("devtools") < 1.6) {
install.packages("devtools")
}
devtools::install_github("benbarnard/covTestR")
If you encounter a clear bug, please file a minimal reproducible example on github.
This is a basic example which shows you how to solve a common problem:
library(tidyverse)
## ── Attaching packages ───────────────────────────────────── tidyverse 1.2.1 ──
## ✔ ggplot2 2.2.1 ✔ purrr 0.2.4
## ✔ tibble 1.3.4 ✔ dplyr 0.7.4
## ✔ tidyr 0.7.2 ✔ stringr 1.2.0
## ✔ readr 1.1.1 ✔ forcats 0.2.0
## ── Conflicts ──────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
library(covTestR)
iris %>% group_by(Species) %>% homogeneityCovariances
##
## Boxes' M Homogeneity of Covariance Matrices Test
##
## data: setosa, versicolor and virginica
## Chi-Squared = 146.66, df = 2550, p-value = 1
## alternative hypothesis: true difference in covariance matrices is not equal to 0