PCA | R Documentation |
Performs Principal Component Analysis (PCA) with supplementary individuals, supplementary quantitative variables and supplementary categorical variables. Missing values are replaced by the column mean.
PCA(
d,
scale.unit = TRUE,
ncp = ncol(d) - length(quanti.sup) - length(quali.sup),
ind.sup = NULL,
quanti.sup = NULL,
quali.sup = NULL,
row.w = NULL,
col.w = NULL
)
d |
A data frame with n rows (individuals) and p columns (numeric variables). |
scale.unit |
A boolean, if TRUE (value set by default) then data are scaled to unit variance. |
ncp |
The number of dimensions kept in the results (by default 5). |
ind.sup |
A vector indicating the indexes of the supplementary individuals. |
quanti.sup |
A vector indicating the indexes of the quantitative supplementary variables. |
quali.sup |
A vector indicating the indexes of the categorical supplementary variables. |
row.w |
An optional row weights (by default, a vector of 1 for uniform row weights); the weights are given only for the active individuals. |
col.w |
An optional column weights (by default, uniform column weights); the weights are given only for the active variables. |
The PCA on the dataset.
PCA
, CA
, MCA
, plot.factorial
, kaiser
, factorial-class
require (datasets)
data (iris)
PCA (iris, quali.sup = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.