This is a README file of the R package NPCovSepTest. In our paper, available here, we test the separability of the covariance matrix by permutation-based methods.
To install our package, you may simply execute the following codes:
# install.packages("devtools")
devtools::install_github("inmybrain/NPCovSepTest", subdir = "NPCovSepTest") # don't forget to specify subdir!
If you come across a problem like this, please refer to this answer in that issue.
Or you can install the source file using the command line after downloading it from here;
R CMD INSTALL NPCovSepTest_2.0.tar.gz
We give a toy example to test the main functions Min_PermTest
,
Max_PermTest
, and Twost_PermTest
. First, we generate (20) samples
from the multivariate Gaussian distribution with a separable covariance
matrix.
# install.packages("mvtnorm")
library("NPCovSepTest")
U <- matrix(c(1,0.5,0.5,1), nrow = 2)
V <- diag(rep(1,3))
set.seed(6)
Y <- mvtnorm::rmvnorm(20, sigma = U %x% V)
Min_PermTest(Y, 2, 3)
Max_PermTest(Y, 2, 3)
Twost_PermTest(Y, 2, 3)
All results indicate there is no strong evidence to reject the null, i.e. separability of the covariance matrix.
To cite this package, please use this bibtex format:
@article{Park:2019,
title = {Permutation based testing on covariance separability},
DOI = {10.1007 / s00180 - 018 - 0839 - 2},
journal = {Computational Statistics},
author = {Park, Seongoh and Lim, Johan and Wang, Xinlei and Lee, Sanghan},
year = {2019},
volume = {34},
number = {2},
pages = {865–883}
}
We are happy to troubleshoot any issue with the package;
-
please contact to the maintainer by [email protected], or
-
please open an issue in the github repository.