Performs standardization (centering and scaling) of a data matrix.

1 2 3 4 5 |

`x, newdata` |
numeric matrices. The data to standardize. |

`center` |
logical value or numeric vector of length equal to the
number of coloumns of |

`scale` |
logical value or numeric vector of length equal to the
number of coloumns of |

`object` |
an object inheriting from class |

`var` |
A variable. |

`call` |
The term in the formula, as a call. |

`...` |
other arguments. Currently ignored. |

`makepredictcall.stdized`

is an internal utility function; it is not
meant for interactive use. See `makepredictcall`

for details.

If `center`

is `TRUE`

, `x`

is centered by subtracting
the coloumn mean from each coloumn. If `center`

is a numeric
vector, it is used in place of the coloumn means.

If `scale`

is `TRUE`

, `x`

is scaled by dividing each
coloumn by its sample standard deviation. If `scale`

is a
numeric vector, it is used in place of the standard deviations.

Both `stdize`

and `predict.stdized`

return a scaled and/or
centered matrix, with attributes `"stdized:center"`

and/or
`"stdized:scale"`

the vector used for centering and/or scaling.
The matrix is given class `c("stdized", "matrix")`

.

`stdize`

is very similar to `scale`

. The
difference is that when `scale = TRUE`

, `stdize`

divides the
coloumns by their standard deviation, while `scale`

uses the
root-mean-square of the coloumns. If `center`

is `TRUE`

,
this is equivalent, but in general it is not.

Bjørn-Helge Mevik and Ron Wehrens

1 2 3 4 5 6 7 8 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.