standardize {SIS} | R Documentation |
Standardization of High-Dimensional Design Matrices
Description
Standardizes the columns of a high-dimensional design matrix to mean zero and unit Euclidean norm.
Usage
standardize(X)
Arguments
X |
A design matrix to be standardized. |
Details
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 \sum_{i=1}^{n} x_{ij} =
0
and \sum_{i=1}^{n} x_{ij}^{2} = 1
for j=1,...,p
.
Value
A design matrix with standardized predictors or columns.
Author(s)
Jianqing Fan, Yang Feng, Diego Franco Saldana, Richard Samworth, and Yichao Wu
References
Diego Franco Saldana and Yang Feng (2018) SIS: An R package for Sure Independence Screening in Ultrahigh Dimensional Statistical Models, Journal of Statistical Software, 83, 2, 1-25.
Examples
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)