Learn R Programming

adamethods (version 1.2.1)

archetypoids_funct_robust: Archetypoid algorithm with the functional robust Frobenius norm

Description

Archetypoid algorithm with the functional robust Frobenius norm to be used with functional data.

Usage

archetypoids_funct_robust(numArchoid, data, huge = 200, ArchObj, PM, prob)

Arguments

numArchoid

Number of archetypoids.

data

Data matrix. Each row corresponds to an observation and each column corresponds to a variable. All variables are numeric.

huge

Penalization added to solve the convex least squares problems.

ArchObj

The list object returned by the stepArchetypesRawData_funct_robust function.

PM

Penalty matrix obtained with eval.penalty.

prob

Probability with values in [0,1].

Value

A list with the following elements:

  • cases: Final vector of archetypoids.

  • rss: Residual sum of squares corresponding to the final vector of archetypoids.

  • archet_ini: Vector of initial archetypoids.

  • alphas: Alpha coefficients for the final vector of archetypoids.

  • resid: Matrix with the residuals.

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

archetypoids

Examples

Run this code
# 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)

lass <- stepArchetypesRawData_funct_robust(data = data_archs, numArch = 3, 
                                           numRep = 5, verbose = FALSE, 
                                           saveHistory = FALSE, PM, prob = 0.8)

afr <- archetypoids_funct_robust(3, data_archs, huge = 200, ArchObj = lass, PM, 0.8)
str(afr)
# }
# NOT RUN {
                                                     
# }

Run the code above in your browser using DataLab