View source: R/choice.component.R
choice.component | R Documentation |
Helps the user to choose the appropriate number of PCAOS component to optimize
choice.component( data, level.scale = rep("num", ncol(data)), nb.comp.to.investigate = 5, supp.var = NULL )
data |
a data frame with n rows (individuals) and p columns (numeric, nominal and/or ordinal variables) |
level.scale |
vector(length p) giving the nature of each variable. Possible values: "nom", "ord", "num" |
nb.comp.to.investigate |
Number of components to investigate (default=ncol(data)) |
supp.var |
a vector indicating the indexes of the supplementary variables |
Data frame with global Loss value and percentage of the quantified variables inertia explained, for different model dimensionality (H). The last column provides the variation in percentage between to two successive size of dimensionality.
Martin PARIES (Maintainer: martin.paries@oniris-nantes.fr)
Evelyne Vigneau
Stephanie Bougeard
data("antibiotic") #Construction of the "level.scale" argument for this dataset level.scale <- rep(NA,ncol(antibiotic)) level.scale[c(2,3,4)] <- "num" level.scale[c(1,5,6,7,8,9,10,11,12,13,14,15)] <- "nom" level.scale[c(1,15)] <- "ord" res.choice <- choice.component(antibiotic,level.scale) res.choice
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.