do_fada_robust {adamethods}R Documentation

Run the whole archetypoid analysis with the functional robust Frobenius norm

Description

This function executes the entire procedure involved in the functional archetypoid analysis. Firstly, the initial vector of archetypoids is obtained using the functional archetypal algorithm and finally, the optimal vector of archetypoids is returned.

Usage

do_fada_robust(subset, numArchoid, numRep, huge, prob, compare = FALSE, PM,
              vect_tol = c(0.95, 0.9, 0.85), alpha = 0.05, 
              outl_degree = c("outl_strong", "outl_semi_strong", "outl_moderate"),
              method = "adjbox")

Arguments

subset

Data to obtain archetypes. In fadalara this is a subset of the entire data frame.

numArchoid

Number of archetypes/archetypoids.

numRep

For each numArch, run the archetype algorithm numRep times.

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 do_fada.

PM

Penalty matrix obtained with eval.penalty.

vect_tol

Vector the tolerance values. Default c(0.95, 0.9, 0.85). Needed if method='toler'.

alpha

Significance level. Default 0.05. Needed if method='toler'.

outl_degree

Type of outlier to identify the degree of outlierness. Default c("outl_strong", "outl_semi_strong", "outl_moderate"). Needed if method='toler'.

method

Method to compute the outliers. Options allowed are 'adjbox' for using adjusted boxplots for skewed distributions, and 'toler' for using tolerance intervals.

Value

A list with the following elements:

Author(s)

Guillermo Vinue, Irene Epifanio

References

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

See Also

stepArchetypesRawData_funct_robust, archetypoids_funct_robust

Examples

## Not run: 
library(fda)
?growth
str(growth)
hgtm <- t(growth$hgtm)

# Create basis:
basis_fd <- create.bspline.basis(c(1,ncol(hgtm)), 10)
PM <- eval.penalty(basis_fd)
# Make fd object:
temp_points <- 1:ncol(hgtm)
temp_fd <- Data2fd(argvals = temp_points, y = growth$hgtm, basisobj = basis_fd)
data_archs <- t(temp_fd$coefs)

suppressWarnings(RNGversion("3.5.0"))
set.seed(2018)
res_fada_rob <- do_fada_robust(subset = data_archs, numArchoid = 3, numRep = 5, huge = 200,
                               prob = 0.75, compare = FALSE, PM = PM, method = "adjbox")
str(res_fada_rob)  

suppressWarnings(RNGversion("3.5.0"))
set.seed(2018)
res_fada_rob1 <- do_fada_robust(subset = data_archs, numArchoid = 3, numRep = 5, huge = 200,
                                prob = 0.75, compare = FALSE, PM = PM, 
                                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_fada_rob1) 

## End(Not run)
                                  

[Package adamethods version 1.2.1 Index]