Description Usage Arguments Value Author(s) References Examples
Scales the data matrix with the median and median absolute deviation.
1 |
X |
Data design matrix. |
Numeric transformed data matrix with same dimension as original data.
Thomas Welchowski welchow@imbie.meb.uni-bonn.de
Ricardo A. Maronna and R. Douglas Martin and Victor J. Yohai, (2006), Robust Statistics: Theory and Methods, John Wiley \& Sons, Ltd.
1 2 3 4 5 6 7 8 9 10 11 12 | # Generate data matrix
set.seed(150)
X <- matrix(rnorm(100*3), ncol=3)
# Robust standardization
scaledX <- robustStandard(X=X)
# Median equals 0
all.equal(sapply(1:3, function(x) median(scaledX[,x])), rep(0, 3))
# MAD equals 1
all.equal(sapply(1:3, function(x) mad(scaledX[,x], constant=1)), rep(1, 3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.