wrap {cellWise}  R Documentation 
Transforms multivariate data X
using the wrapping function with b = 1.5
and c = 4
. By default, it starts by calling checkDataSet
to clean the data and estLocScale
to estimate the location and scale of the variables in the cleaned data. Alternatively, it works with userprovided vectors of location and scale given by locX
and scaleX
.
wrap(X, locX = NULL, scaleX = NULL, precScale = 1e12, imputeNA = TRUE, checkPars = list())
X 
the input data. It must be an n by d matrix or a data frame. 
locX 
The location estimates of the columns of the input data 
scaleX 
The scale estimates of the columns of the input data 
precScale 
The precision scale used throughout the algorithm. Defaults to 1e12 
imputeNA 
Whether or not to impute the 
checkPars 
Optional list of parameters used in the call to

A list with components:
Xw
The wrapped data.
colInWrap
The column numbers of the variables which were wrapped. Variables which were filtered out by checkDataSet
(because of a (near) zero scale for example), will not appear in this output.
loc
The location estimates for all variables used for wrapping.
scale
The scale estimates for all variables used for wrapping.
Raymaekers, J. and Rousseeuw P.J.
Raymaekers, J., Rousseeuw P.J. (2019). Fast robust correlation for high dimensional data. Technometrics, published online. (link to open access pdf)
library(MASS) set.seed(12345) n < 100; d < 10 X < mvrnorm(n, rep(0, 10), diag(10)) locScale < estLocScale(X) Xw < wrap(X, locScale$loc, locScale$scale)$Xw # For more examples, we refer to the vignette: vignette("wrap_examples")