scale_ssMRCD | R Documentation |
Scale Data Locally
scale_ssMRCD(
ssMRCD,
X = NULL,
groups = NULL,
multivariate = FALSE,
center_only = FALSE
)
ssMRCD |
|
X |
matrix, new data to scale with ssMRCD estimation. |
groups |
vector, group assignments of new data |
multivariate |
logical, |
center_only |
logical, if |
Returns matrix of observations. If X = NULL
X from the ssMRCD object is
used and sorted according to group numbering.
ssMRCD
# create data set
x1 = matrix(runif(200), ncol = 2)
x2 = matrix(rnorm(200), ncol = 2)
x = list(x1, x2)
# create weighting matrix
W = matrix(c(0, 1, 1, 0), ncol = 2)
# calculate ssMRCD
localCovs = ssMRCD(x, weights = W, lambda = 0.5)
# scale used data
scale_ssMRCD(localCovs,
multivariate = TRUE)
# scale new data
scale_ssMRCD(localCovs,
X = matrix(rnorm(20), ncol = 2, nrow = 10),
groups = rep(2, 10),
multivariate =TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.