covmat.ts: Nonparametric Tests for the Row or Column Covariance Matrix

Description Usage Arguments Details Value Author(s) References Examples

View source: R/covmat.ts.R

Description

Testing the sphericity, identity and diagonality hypotheses for the row or column covariance matrix.

Usage

1
covmat.ts(datamat = datamat, N = N, voi = "rows", centered = FALSE)

Arguments

datamat

numeric matrix containing the transposable data.

N

positive integer number indicating the sample size, i.e., the number of subjects.

voi

character indicating if the test should be applied on the row or column covariance matrix. Options include 'rows' or 'columns'.

centered

logical indicating if the transposable data are centered. Options include TRUE or FALSE.

Details

It is assumed that there are nrow(datamat) row variables and ncol(datamat)/N column variables in datamat. Further, datamat should be written in such a way that every ncol(datamat)/N consecutive columns belong to the same subject and the order of the column variables in each block is preserved across subjects.

The tests are nonparametric and thus robust to some departures from the matrix-variate normal model.

Value

It returns a list with components:

diagonality.ts

a list containing the test statistic and p-value of the diagonality hypothesis test.

sphericity.ts

a list containing the test statistic and p-value of the sphericity hypothesis test.

identity.ts

a list containing the test statistic and p-value of the identity hypothesis test.

N

the sample size.

n.rows

the number of row variables.

n.cols

the number of column variables.

variables

character indicating if the tests were applied to the row or column covariance matrix.

centered

logical indicating if the transposable data were centered.

Author(s)

Anestis Touloumis

References

Touloumis, A., Marioni, J.C. and Tavare, S. (2019+). Hypothesis Testing for the Covariance Matrix in High-Dimensional Transposable Data with Kronecker Product Dependence Structure. Statistica Sinica.

Examples

1
2
3
4
5
6
7
data(VEGFmouse)
## Hypothesis tests for the covariance matrix of the genes (rows).
genes_cov_test <- covmat.ts(datamat = VEGFmouse, N = 40)
genes_cov_test
## Hypothesis tests for the covariance matrix of the tissues (columns).
tissues_cov_test <- covmat.ts(datamat = VEGFmouse, N = 40, voi = 'columns')
tissues_cov_test

Example output

SPHERICITY AND IDENTITY TESTS FOR THE ROW OR COLUMN VARIABLES 
Sample size           =  40 
Row variables         =  46 
Column variables      =  9 
Variables tested      =  Rows 
Centered data         =  FALSE 

Sphericity test for the covariance matrix of the Rows 
Test Statistic = 136.2139 , p-value < 0.0001

Identity test for the covariance matrix of the Rows 
Test Statistic = 31.1655 , p-value < 0.0001
SPHERICITY AND IDENTITY TESTS FOR THE ROW OR COLUMN VARIABLES 
Sample size           =  40 
Row variables         =  46 
Column variables      =  9 
Variables tested      =  Columns 
Centered data         =  FALSE 

Sphericity test for the covariance matrix of the Columns 
Test Statistic = 10.474 , p-value < 0.0001

Identity test for the covariance matrix of the Columns 
Test Statistic = 39.0576 , p-value < 0.0001

HDTD documentation built on Nov. 8, 2020, 8:25 p.m.