covmat.hat:
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".
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.
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.
data(VEGFmouse)
# Estimating the covariance matrices of the genes (rows) and of the tissues (columns).estcovmat <- covmat.hat(VEGFmouse,40,shrink="both",centered=FALSE)
estcovmat