PCA {fdm2id} | R Documentation |
Principal Component Analysis (PCA)
Description
Performs Principal Component Analysis (PCA) with supplementary individuals, supplementary quantitative variables and supplementary categorical variables. Missing values are replaced by the column mean.
Usage
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
)
Arguments
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. |
Value
The PCA on the dataset.
See Also
PCA
, CA
, MCA
, plot.factorial
, kaiser
, factorial-class
Examples
require (datasets)
data (iris)
PCA (iris, quali.sup = 5)