An Exact Test for a Change in Covariance (Dependence) Structure

An exact finite-sample test for whether two groups share a covariance matrix, the omnibus form of the differential-network question. Under the Gaussian null the likelihood-ratio statistic has a distribution given by the real Jacobi ensemble that is free of the unknown common covariance, so a single Monte-Carlo calibration at the identity serves every covariance with no estimate of the nuisance covariance; this is the property that survives the dimension barrier, where estimating the covariance is hardest. The max-type high-dimensional test of Cai, Liu and Xia (2013) is provided for comparison. A pure-C back-end does the numerics and also backs the 'Python' package 'regstat'.


regstat

R-CMD-check

An exact, covariance-free test for a change in covariance structure. The likelihood-ratio null does not depend on the unknown common covariance, so one calibration serves every covariance.

Computation runs on a shared pure-C back-end that is also bound from Python, and the two front ends are checked against each other value by value.

Installation

# install.packages("remotes")
remotes::install_github("mtloots/regstat", subdir = "regstat")

Usage

library(regstat)
set.seed(1)
XA <- matrix(rnorm(180), 60, 3)
XB <- matrix(rnorm(150), 50, 3) %*% diag(c(1, 1.6, 0.7))
c(same = cov_M(XA, XA), different = cov_M(XA, XB))
#>      same different 
#>   0.00000  35.19953
cov_test(XA, XB, method = "exact")$p.value
#> [1] 6.38278e-06

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("regstat")

0.1.0 by M. Theodor Loots, 22 days ago


https://github.com/mtloots/regstat


Report a bug at https://github.com/mtloots/regstat/issues


Browse source code at https://github.com/cran/regstat


Authors: M. Theodor Loots [aut, cre] (ORCID:


Documentation:   PDF Manual  


GPL-3 license


Imports stats

Suggests knitr, rmarkdown, testthat


See at CRAN