Make.Z: Standardize Data

Make.ZR Documentation

Standardize Data

Description

Converts data to standard normal (mean = 0; SD = 1) - i.e., z-scores.

Usage

Make.Z(x)

Arguments

x

Any data object (especially useful for multiple columns of a data.frame).

Details

Takes the data (by columns if necessary) and subtracts out the mean and then divides by the standard deviation. The result is a standard normal z score.

Value

A numeric or matrix containing standardized data (i.e., z scores)

Warning

The result is a matrix. One may wish to convert to data.frame or use as.data.frame(Make.Z(x))

Author(s)

Thomas D. Fletcher t.d.fletcher05@gmail.com

Examples


zUSJR <- Make.Z(USJudgeRatings)	# creates new object containg z scores
dim(zUSJR)			# shows that there are 43 observed z scores for 12 variables
zUSJR[,1]			# to look at only the first column of z scores


QuantPsyc documentation built on June 4, 2022, 1:06 a.m.