standardize: Standardization of High-Dimensional Design Matrices

Description Usage Arguments Details Value Author(s) References Examples

View source: R/standardize.R

Description

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

Usage

1

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 ∑_{i=1}^{n} x_{ij} = 0 and ∑_{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

 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)

SIS documentation built on March 26, 2020, 7:43 p.m.

Related to standardize in SIS...