1 |
x |
|
SCORES |
|
STAND |
|
est |
|
varfun |
|
SEED |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (x, SCORES = FALSE, STAND = TRUE, est = tmean, varfun = winvar,
SEED = TRUE)
{
x = elimna(x)
if (STAND)
x = standm(x, est = est, scat = varfun)
v = robpca(x, pr = FALSE, plotit = FALSE, SEED = SEED)
cumsum(v$L/sum(v$L))
val = matrix(NA, ncol = length(v$L), nrow = 4)
scores = NULL
if (SCORES)
scores = v$T
dimnames(val) = list(c("Number of Comp.", "Robust Stand Dev",
"Proportion Robust var", "Cum. Proportion"), NULL)
val[1, ] = c(1:length(v$L))
val[2, ] = sqrt(v$L)
val[3, ] = v$L/sum(v$L)
val[4, ] = cumsum(v$L/sum(v$L))
list(summary = val, scores = scores)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.