Learn R Programming

Anthropometry (version 1.1)

stepArchetypesMod: Archetype algorithm to raw data

Description

This is a slight modification of the original stepArchetypes function of the archetypes R package to apply the archetype algorithm to raw data. The stepArchetypes function standardizes the data by default and this option is not always desired.

Usage

stepArchetypesMod(data,k,nrep=3,verbose=TRUE)

Arguments

data
Data to obtain archetypes.
k
Number of archetypes to compute, from 1 to k.
nrep
For each k, run archetypes nrep times.
verbose
If TRUE, the progress during execution is shown.

Value

  • A list with k elements. Each element is a list of class attribute stepArchetypes with nrep elements.

References

Eugster, M. J., and Leisch, F., (2009). From Spider-Man to Hero - Archetypal Analysis in R, Journal of Statistical Software 30, 1--23, http://www.jstatsoft.org/.

Vinue, G., Epifanio, I., and Alemany, S., (2014). Archetypoids: a new approach to define representative archetypal data. Submitted for publication.

See Also

stepArchetypes

Examples

Run this code
#Cockpit design problem:
#First, the database USAF 1967 is read and preprocessed (Zehner et al (1993).).
m <- dataUSAF
#Variable selection:
sel <- c(48,40,39,33,34,36)
#Changing to inches: 
mpulg <- m[,sel] / (10 * 2.54)

#Data preprocessing:
preproc <- accommodation(mpulg,TRUE,0.95,TRUE)

#For reproducing results, seed for randomness:
set.seed(2010) 
#Run archetypes algorithm repeatedly from 1 to numArch archetypes:
numArch <- 10 ; nrep <- 3
lass <- stepArchetypesMod(data=preproc$data,k=1:numArch,verbose=FALSE,nrep=nrep)

Run the code above in your browser using DataLab