normalize: Normalizes a Numeric Matrix by Columns.

View source: R/normalize.R

normalizeR Documentation

Normalizes a Numeric Matrix by Columns.

Description

For a variable considered to be used in Dynamic Model Averaging (or Dynamic Model Selection, etc.), sometimes it is desirable to have all its values between 0 and 1. This function rescales the values to fit between 0 and 1.

If the argument is not a matrix, the function tries to convert the object into a matrix. For example, it works smoothly for xts objects.

Usage

normalize(data)

Arguments

data

matrix, observations are put in rows, and variables are grouped by columns

Value

matrix

See Also

standardize

Examples

wti <- crudeoil[-1,1]
drivers <- (lag(crudeoil[,-1],k=1))[-1,]

nwti <- normalize(wti)

nd <- normalize(drivers)

normalize(cbind(c(0,1,2),c(1,2,3),c(0,1,3)))

fDMA documentation built on July 26, 2023, 6:09 p.m.

Related to normalize in fDMA...