covmat.hat {HDTD} | R Documentation

## Estimation of the Row and of the Column Covariance Matrices.

### Description

This function provides the row and/or column covariance matrix estimators.

### Usage

    covmat.hat(datamat, N, shrink = "both", centered = FALSE, voi = "both")

### Arguments

`datamat` | numeric matrix containing the transposable data.
`N` | positive integer number indicating the sample size, i.e., the number of subjects.
`shrink` | character indicating if shrinkage estimation should be performed. Options include '`rows`', '`columns`', '`both`' and '`none`'.
`centered` | logical indicating if the transposable data are centered. Options include `TRUE` or `FALSE`.
`voi` | character indicating if the row, column or both covariance matrices should be printed. Options include '`rows`', '`columns`' and '`both`'.

### 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.

For identifiability reasons, the trace of the row covariance matrix is set equal to its dimension. If you want to place the equivalent restriction on the column covariance matrix, interchange the role of row and column variables by utilizing the function `transposedata`.

### Value

Returns a list with components:

`rows.covmat` | the estimated row covariance matrix.
`rows.intensity` | the estimated row intensity.
`cols.covmat` | the estimated column covariance matrix.
`cols.intensity` | the estimated column intensity.
`N` | the sample size.
`n.rows` | the number of row variables.
`n.cols` | the number of column variables.
`shrink` | character indicating if shrinkage estimation was performed.
`centered` | logical indicating if the transposable data were centered.

### Author(s)

Anestis Touloumis

### References

Touloumis, A., Marioni, J. C. and Tavare, S. (2016) HDTD: Analyzing multi-tissue gene expression data, Bioinformatics 32, 2193–2195.

### Examples

    data(VEGFmouse)
    # Estimating the gene and tissue covariance matrices.
    est_cov_mat <- covmat.hat(datamat = VEGFmouse, N = 40)
    est_cov_mat

[Package HDTD version 1.26.0 Index]