z: Standarize

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

View source: R/linearAlgebra-z.R

Description

Calculates standardized scores.

Usage

1
z(x)

Arguments

x

Numeric matrix or vector. Data.

Details

The standardized score for the j^{\mathrm{th}} column of a matrix \mathbf{X} is given by

\frac{\mathbf{x}_{j} - \bar{x}_{j}}{s_{j}}

where \mathbf{x}_{j} is the j^{\mathrm{th}} column of a matrix \mathbf{X}, \bar{x}_{j} is the mean of \mathbf{x}_{j}, and s_{j} is the standard deviation of \mathbf{x}_{j}.

Value

A matrix.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Scaling Functions: deltacapsq(), d()

Examples

1
2
3
4
5
6
x <- matrix(
  rnorm(n = 5 * 5, mean = 100, sd = 15),
  ncol = 5
)

z(x)

jeksterslab/linearAlgebra documentation built on Dec. 20, 2021, 10:10 p.m.