pre.scale, pre.sphere {ks} | R Documentation |
Pre-sphered or pre-scaled version of data.
pre.sphere(x, mean.centred=FALSE) pre.scale(x, mean.centred=FALSE)
x |
matrix of data values |
mean.centred |
if TRUE then centre the data values to have zero mean |
For pre-scaling, the data values are pre-multiplied by S^(-1/2) and for pre-scaling, by S_D^(-1/2) where S is the sample variance and S_D is diag (S_1^2, S_2^2, ..., S_d^2) where S_i^2 is the i-th marginal sample variance.
If H* is the bandwidth matrix for the pre-transformed data and H is the bandwidth matrix for the original data, then S^(1/2) H* S^(1/2) or S_D^(1/2) H* S_D^(1/2) as appropriate.
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.
data(unicef) unicef <- as.matrix(unicef) unicef.sp <- pre.sphere(unicef) unicef.sc <- pre.scale(unicef, mean.centred=TRUE) var(unicef.sp) var(unicef.sc)