Learn R Programming

HDTD (version 1.6.0)

centerdata: Centering Transposable Data

Description

This function centers the transposable data around their sample mean matrix.

Usage

centerdata(datamat, N)

Arguments

datamat
numeric matrix containing the transposable data.
N
positive integer number indicating the sample size, i.e., the number of subjects.

Value

Returns a matrix of the same size as datamat.

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.

See Also

covmat.hat and covmat.ts.

Examples

Run this code
data(VEGFmouse)
## Centering the VEGF dataset around the sample mean matrix.
VEGFcen <- centerdata(VEGFmouse,40)

Run the code above in your browser using DataLab