Standardizes the columns of a high-dimensional design matrix to mean zero and unit Euclidean norm.

1 | ```
standardize(X)
``` |

`X` |
A design matrix to be standardized. |

Performs a location and scale transform to the columns of the original
design matrix, so that the resulting design matrix with *p*-dimensional
observations *\{x_i : i=1,...,n\}* of the form
*x_i=(x_{i1},x_{i2},...,x_{ip})* satisfies *∑_{i=1}^{n} x_{ij} =
0* and *∑_{i=1}^{n} x_{ij}^{2} = 1* for *j=1,...,p*.

A design matrix with standardized predictors or columns.

Jianqing Fan, Yang Feng, Diego Franco Saldana, Richard Samworth, and Yichao Wu

Diego Franco Saldana and Yang Feng (2016) SIS: An R package for Sure Independence Screening in
Ultrahigh Dimensional Statistical Models, *Journal of Statistical Software*, to appear.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ```
set.seed(0)
n = 400; p = 50; rho = 0.5
corrmat = diag(rep(1-rho, p)) + matrix(rho, p, p)
corrmat[,4] = sqrt(rho)
corrmat[4, ] = sqrt(rho)
corrmat[4,4] = 1
corrmat[,5] = 0
corrmat[5, ] = 0
corrmat[5,5] = 1
cholmat = chol(corrmat)
x = matrix(rnorm(n*p, mean=15, sd=9), n, p)
x = x%*%cholmat
x.standard = standardize(x)
``` |

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

Please suggest features or report bugs with the GitHub issue tracker.

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