wu.li.statistic: Wu-Li test statistic

View source: R/wu_li_test.R

wu.li.statisticR Documentation

Wu-Li test statistic

Description

This function computes the test statistics for one and two sample hypothesis of covariance matrices as described in Wu and Li (need citation)

Usage

wu.li.statistic(x, y = NULL, nrand = 1000, test = "identity")

Arguments

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 x. If not provided (default value is NULL), then the one-sample tests are performed as specified.

nrand

number of random projections to be generated for the one-dimension projections.

test

Type of test to be performed. When y = NULL, you can specify "identity" (Default) or "sphericity". If y is provided as a non-null data matrix, any specified value for test will be over-written to test = "two.sample".

Value

A list with two values

test.statistic

The test statistic value

crit.value

The critical value to accept or reject the null hypothesis based on the test.statistic returned

References

T.-L. Wu and P. Li. Projected tests for high-dimensional covariance matrices. Journal of Statistical Planning and Inference, 207:73 – 85, 2020.

See Also

gev.critvalue

Examples

library(mvtnorm)
x = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
y = rmvnorm(n = 100, mean = numeric(10), sigma = diag(10))
wu.li.statistic(x, y, nrand = 1e2)

dnayyala/cramp documentation built on June 27, 2023, 1:34 p.m.