Learn R Programming

HDTD (version 1.6.0)

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

Description

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

Usage

covmat.ts(datamat, 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.

Value

It returns a list with components:
sphericity.ts
a list containing the test statistic and p-value of the sphericity test.
identity.ts
a list containing the test statistic and p-value of the identity 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.

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 departures from the matrix-variate normal model.

References

Touloumis, A., Marioni, J.C. and Tavare, S. (2013). Hypothesis Testing for the Covariance Matrix in High-Dimensional Transposable Data with Kronecker Product Dependence Structure. http://arxiv.org/abs/1404.7684.

Examples

Run this code
data(VEGFmouse)
## Hypothesis tests for the covariance matrix of the genes (rows).
genestest <- covmat.ts(VEGFmouse,40,"rows",FALSE)
genestest
## Hypothesis tests for the covariance matrix of the tissues (columns).
tissuestest <- covmat.ts(VEGFmouse,40,"columns",FALSE)
tissuestest

Run the code above in your browser using DataLab