Description Usage Arguments Value Author(s) References See Also Examples
This function executes the entire procedure involved in the archetypoid analysis. Firstly, the initial vector of archetypoids is obtained using the archetypal algorithm and finally, the optimal vector of archetypoids is returned.
1 2 3 4 |
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. |
compare |
Boolean argument to compute the 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. |
prob |
If |
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_rob: If compare=TRUE
, this is the residual sum of squares using
the robust Frobenius norm. Otherwise, NULL.
resid: Vector with the residuals.
outliers: Outliers.
Guillermo Vinue, Irene Epifanio
Eugster, M.J.A. and Leisch, F., From Spider-Man to Hero - Archetypal Analysis in R, 2009. Journal of Statistical Software 30(8), 1-23, https://doi.org/10.18637/jss.v030.i08
Vinue, G., Epifanio, I., and Alemany, S., Archetypoids: a new approach to define representative archetypal data, 2015. Computational Statistics and Data Analysis 87, 102-115, https://doi.org/10.1016/j.csda.2015.01.018
Vinue, G., Anthropometry: An R Package for Analysis of Anthropometric Data, 2017. Journal of Statistical Software 77(6), 1-39, https://doi.org/10.18637/jss.v077.i06
stepArchetypesRawData_norm_frob
, archetypoids_norm_frob
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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 <- do_ada(preproc$data, k, numRep, huge, FALSE, method = "adjbox")
str(res_ada)
res_ada1 <- do_ada(preproc$data, k, numRep, huge, 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_ada1)
res_ada2 <- do_ada(preproc$data, k, numRep, huge, TRUE, method = "adjbox", prob = 0.8)
str(res_ada2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.