centerdata: Centering Transposable Data

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/centerdata.R

Description

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

Usage

1
centerdata(datamat, N)

Arguments

datamat

numeric matrix containing the transposable data.

N

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

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.

Value

Returns a matrix of the same size as datamat.

Author(s)

Anestis Touloumis

See Also

covmat.hat and covmat.ts.

Examples

1
2
3
data(VEGFmouse)
## Centering the VEGF dataset around the sample mean matrix.
VEGFcen <- centerdata(datamat = VEGFmouse, N = 40)

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