standardize {bapred} | R Documentation |
Performs batch effect adjustment by standardizing the variables within batches to have zero mean and variance one.
standardize(x, batch)
x |
matrix. The covariate matrix. Observations in rows, variables in columns. |
batch |
factor. Batch variable. Currently has to have levels: '1', '2', '3' and so on. |
standardize
returns an object of class standardize
.
An object of class "standardize
" is a list containing the following components:
xadj |
matrix of adjusted (training) data |
nbatches |
number of batches |
batch |
batch variable |
Roman Hornung
data(autism) params <- standardize(x=X, batch=batch)