Description Usage Arguments Value Author(s) References See Also Examples
View source: R/do_ada_robust.R
This function executes the entire procedure involved in the robust archetypoid analysis. Firstly, the initial vector of archetypoids is obtained using the robust archetypal algorithm and finally, the optimal vector of robust archetypoids is returned.
1 2 3 4 | do_ada_robust(subset, numArchoid, numRep, huge, prob, compare = FALSE,
vect_tol = c(0.95, 0.9, 0.85), alpha = 0.05,
outl_degree = c("outl_strong", "outl_semi_strong", "outl_moderate"),
method = "adjbox")
|
subset |
Data to obtain archetypes. In ADALARA this is a subset of the entire data frame. |
numArchoid |
Number of archetypes/archetypoids. |
numRep |
For each |
huge |
Penalization added to solve the convex least squares problems. |
prob |
Probability with values in [0,1]. |
compare |
Boolean argument to compute the non-robust residual sum of squares
to compare these results with the ones provided by |
vect_tol |
Vector the tolerance values. Default c(0.95, 0.9, 0.85).
Needed if |
alpha |
Significance level. Default 0.05. Needed if |
outl_degree |
Type of outlier to identify the degree of outlierness.
Default c("outl_strong", "outl_semi_strong", "outl_moderate").
Needed if |
method |
Method to compute the outliers. Options allowed are 'adjbox' for using adjusted boxplots for skewed distributions, and 'toler' for using tolerance intervals. |
A list with the following elements:
cases: Final vector of archetypoids.
alphas: Alpha coefficients for the final vector of archetypoids.
rss: Residual sum of squares corresponding to the final vector of archetypoids.
rss_non_rob: If compare=TRUE
, this is the residual sum of squares using
the non-robust Frobenius norm. Otherwise, NULL.
resid Vector of residuals.
outliers: Outliers.
Guillermo Vinue, Irene Epifanio
Moliner, J. and Epifanio, I., Robust multivariate and functional archetypal analysis with application to financial time series analysis, 2019. Physica A: Statistical Mechanics and its Applications 519, 195-208. https://doi.org/10.1016/j.physa.2018.12.036
stepArchetypesRawData_robust
, archetypoids_robust
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 26 | ## Not run:
library(Anthropometry)
data(mtcars)
#data <- as.matrix(mtcars)
data <- mtcars
k <- 3
numRep <- 2
huge <- 200
preproc <- preprocessing(data, stand = TRUE, percAccomm = 1)
suppressWarnings(RNGversion("3.5.0"))
set.seed(2018)
res_ada_rob <- do_ada_robust(preproc$data, k, numRep, huge, 0.8,
FALSE, method = "adjbox")
str(res_ada_rob)
res_ada_rob1 <- do_ada_robust(preproc$data, k, numRep, huge, 0.8,
FALSE, vect_tol = c(0.95, 0.9, 0.85), alpha = 0.05,
outl_degree = c("outl_strong", "outl_semi_strong",
"outl_moderate"),
method = "toler")
str(res_ada_rob1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.