View source: R/stepArchetypesRawData.R

stepArchetypesRawData | R Documentation |

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.

stepArchetypesRawData(data,numArch,numRep=3,verbose=TRUE)

`data` |
Data to obtain archetypes. |

`numArch` |
Number of archetypes to compute, from 1 to |

`numRep` |
For each |

`verbose` |
If TRUE, the progress during execution is shown. |

A list with `numArch`

elements. Each element is a list of class attribute `stepArchetypes`

with `numRep`

elements.

Guillermo Vinue based on the the original `stepArchetypes`

function of archetypes.

Eugster, M. J., and Leisch, F., (2009). From Spider-Man to Hero - Archetypal Analysis in R, *Journal of Statistical Software* **30**, 1–23, doi: 10.18637/jss.v030.i08.

Vinue, G., Epifanio, I., and Alemany, S., (2015). Archetypoids: a new approach to define representative archetypal data, *Computational Statistics and Data Analysis* **87**, 102–115.

`stepArchetypes`

#COCKPIT DESIGN PROBLEM: #As a toy example, only the first 25 individuals are used. USAFSurvey_First25 <- USAFSurvey[1:25, ] #Variable selection: variabl_sel <- c(48, 40, 39, 33, 34, 36) #Changing to inches: USAFSurvey_First25_inch <- USAFSurvey_First25[,variabl_sel] / (10 * 2.54) #Data preprocessing: USAFSurvey_preproc <- preprocessing(USAFSurvey_First25_inch, TRUE, 0.95, TRUE) #For reproducing results, seed for randomness: #suppressWarnings(RNGversion("3.5.0")) #set.seed(2010) #Run archetype algorithm repeatedly from 1 to numArch archetypes: #This is a toy example. In other situation, choose numArch=10 and numRep=20. numArch <- 5 ; numRep <- 2 lass <- stepArchetypesRawData(data = USAFSurvey_preproc$data, numArch = 1:numArch, numRep = numRep, verbose = FALSE) #To understand the warning messages, see the vignette of the #archetypes package.

Anthropometry documentation built on March 7, 2023, 6:58 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.