getScale {cocons}R Documentation

Fast and simple standardization for the design matrix.

Description

Centers and scale the design matrix.

Usage

getScale(x, mean.vector = NULL, sd.vector = NULL)

Arguments

x

(S4) or (matrix) a coco object, or a n x p matrix with covariate information to introduce, where the first column is a column of ones.

mean.vector

(numeric vector) if provided, it centers covariates based on this information.

sd.vector

(numeric vector) if provided, it scales covariates based on this information.

Value

(list) a list with a scaled design matrix of dimension n x (p+1), and a set of mean and sd vectors employed to scale the matrix

Author(s)

Federico Blasi


[Package cocons version 0.1.2 Index]