50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


ks (version 1.10.7)

pre.transform: Pre-sphering and pre-scaling

Description

Pre-sphered or pre-scaled version of data.

Usage

pre.sphere(x, mean.centred=FALSE)
pre.scale(x, mean.centred=FALSE)

Arguments

x

matrix of data values

mean.centred

flag to centre the data values to have zero mean. Default is FALSE.

Value

Pre-sphered or pre-scaled version of data. These pre-transformations are required for implementing the plug-in Hpi selectors and the smoothed cross validation Hscv selectors.

Details

For pre-scaling, the data values are pre-multiplied by S1/2 and for pre-scaling, by SD1/2 where S is the sample variance and SD is diag(S12,S22,,Sd2) where Si2 is the i-th marginal sample variance.

Examples

Run this code
# NOT RUN {
data(unicef)
unicef.sp <- pre.sphere(as.matrix(unicef))
# }

Run the code above in your browser using DataLab