stan: standardize variables

View source: R/nclreg.R

stanR Documentation

standardize variables

Description

Standardize variables. For each column, return mean 0 and mean value of sum of squares = 1.

Usage

stan(x, weights)

Arguments

x

numeric variables, can be a matrix or vector

weights

numeric positive vector of weights

Value

A list with the following items.

x

standardized variables with each column: mean value 0 and mean value of sum of squares = 1.

meanx

a vector of means for each column in the original x

normx

a vector of scales for each column in the original x

Author(s)

Zhu Wang <zwang145@uthsc.edu>


mpath documentation built on Jan. 7, 2023, 1:17 a.m.