ztrans: A function to convert data into a z-score

Description Usage Arguments Value See Also Examples

Description

This function converts the columns in a data matrix into z-scores. The score is computed by subracting each observation in a column from the column mean and divding by the column standard deviation. Each column is converted independently of the others missing values are ignored in the calculation.

Usage

1
ZTrans(DATA)

Arguments

DATA

A (non-empty) matrix with data values. Columns should be different traits and rows unique observations of those traits

Value

Returns a matrix with the same dimensions as DATA.

See Also

PercentMax, MeanCent

Examples

1
2
3
4
5
6
7
data(Nuclei)

colMeans(Nuclei, na.rm=TRUE)

Nuclei.ZT<-ZTrans(Nuclei)

colMeans(Nuclei.ZT, na.rm=TRUE)

multiDimBio documentation built on April 14, 2020, 5:41 p.m.