Package 'Docovt'

Title: Distributed Online Covariance Matrix Tests
Description: Distributed Online Covariance Matrix Tests is a powerful tool designed to efficiently process and analyze distributed datasets. It enables users to perform covariance matrix tests in an online, distributed manner, making it highly suitable for large-scale data analysis. By leveraging advanced computational techniques, 'Docovt' ensures robust and scalable solutions for statistical analysis, particularly in scenarios where data is dispersed across multiple nodes or sources. This package is ideal for researchers and practitioners working with high-dimensional data, providing a flexible and efficient framework for covariance matrix estimation and hypothesis testing. The philosophy of 'Docovt' is described in Guo G.(2025) <doi:10.1016/j.physa.2024.130308>.
Authors: Guangbao Guo [aut, cre] , Congfan Zhang [aut]
Maintainer: Guangbao Guo <[email protected]>
License: MIT + file LICENSE
Version: 0.1
Built: 2025-02-28 05:27:34 UTC
Source: https://github.com/cran/Docovt

Help Index


One-Sample Covariance Test by Cai and Ma (2013)

Description

Given data, it performs 1-sample test for Covariance where the null hypothesis is

H0:Σn=Σ0H_0 : \Sigma_n = \Sigma_0

where Σn\Sigma_n is the covariance of data model and Σ0\Sigma_0 is a hypothesized covariance based on a procedure proposed by Cai and Ma (2013).

Usage

cm13(X,Sigma0, alpha)

Arguments

X

an (n×p)(n\times p) data matrix where each row is an observation.

Sigma0

a (p×p)(p\times p) given covariance matrix.

alpha

level of significance.

Value

a named list containing:

statistic

a test statistic value.

threshold

rejection criterion to be compared against test statistic.

reject

a logical; TRUE to reject null hypothesis, FALSE otherwise.

Examples

## generate data from multivariate normal with trivial covariance.
p = 5;n=10
X=data = matrix(rnorm(n*p), ncol=p)
alpha=0.05
Sigma0=diag(ncol(X))
cm13(X,Sigma0, alpha)

Two-Sample Covariance Test by Cai and Ma (2013)

Description

Given two sets of data, it performs 2-sample test for equality of covariance matrices where the null hypothesis is

H0:Σ1=Σ2H_0 : \Sigma_1 = \Sigma_2

where Σ1\Sigma_1 and Σ2\Sigma_2 represent true (unknown) covariance for each dataset based on a procedure proposed by Cai and Ma (2013). If statistic >> threshold, it rejects null hypothesis.

Usage

cmtwo(X, Y, alpha)

Arguments

X

an (m×p)(m\times p) matrix where each row is an observation from the first dataset.

Y

an (n×p)(n\times p) matrix where each row is an observation from the second dataset.

alpha

level of significance.

Value

a named list containing

statistic

a test statistic value.

threshold

rejection criterion to be compared against test statistic.

reject

a logical; TRUE to reject null hypothesis, FALSE otherwise.

Examples

## generate 2 datasets from multivariate normal with identical covariance.
p= 5;  n1 = 100; n2 = 150; alpha=0.05
X=data1 = matrix(rnorm(n1*p), ncol=p)
Y=data2 = matrix(rnorm(n2*p), ncol=p)
 
# run test
cmtwo(X, Y, alpha)

One-Sample Covariance Test by Srivastava, Yanagihara, and Kubokawa (2014)

Description

Given data, it performs 1-sample test for Covariance where the null hypothesis is

H0:Σn=Σ0H_0 : \Sigma_n = \Sigma_0

where Σn\Sigma_n is the covariance of data model and Σ0\Sigma_0 is a hypothesized covariance based on a procedure proposed by Srivastava, Yanagihara, and Kubokawa (2014).

Usage

syk(data, Sigma0, alpha)

Arguments

data

an (n×p)(n\times p) data matrix where each row is an observation.

Sigma0

a (p×p)(p\times p) given covariance matrix.

alpha

level of significance.

Value

a named list containing

statistic

a test statistic value.

threshold

rejection criterion to be compared against test statistic.

reject

a logical; TRUE to reject null hypothesis, FALSE otherwise.

Examples

## generate data from multivariate normal with trivial covariance.
p = 5;n=10
data = matrix(rnorm(n*p), ncol=p)
alpha=0.05
Sigma0=diag(ncol(data))
## run the test
syk(data, Sigma0, alpha)