Learn R Programming

bapred (version 1.1)

standardize: Batch effect adjustment by standardization

Description

Performs batch effect adjustment by standardizing the variables within batches to have zero mean and variance one.

Usage

standardize(x, batch)

Arguments

x

matrix. The covariate matrix. Observations in rows, variables in columns.

batch

factor. Batch variable. Each factor level (or 'category') corresponds to one of the batches. For example, if there are four batches, this variable would have four factor levels and observations with the same factor level would belong to the same batch.

Value

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

Examples

Run this code
# NOT RUN {
data(autism)

params <- standardize(x=X, batch=batch)
# }

Run the code above in your browser using DataLab