View source: R/srivastava_tests.R
srivastava.statistic | R Documentation |
This function computes the test statistics from Srivastava et al. (2014) for tests involving the covariance matrices. If two sample matrices are provided, the function returns the result of the comparison of two covariance matrices. When only one data matrix is provided, tests for sphericity
and identity
can be performed.
srivastava.statistic(x, y = NULL, test = "identity")
x |
data matrix of first group with rows representing samples and columns representing variables. |
y |
data matrix of second group with same number of columns as |
test |
Type of test to be performed. When |
A list with two values
The test statistic value
The p-value
M. S. Srivastava, H. Yanagihara, and T. Kubokawa. Tests for covariance matrices in high dimension with less sample size. Journal of Multivariate Analysis, 130:289–309, 2014.
library(mvtnorm)
x = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
y = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
srivastava.statistic(x, y)
srivastava.statistic(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.