An S4 class to store the results of a principal components analysis.
Note
This class inherits from MultivariateAnalysis
.
Examples
## Load data
data("iris")
## Compute principal components analysis
X <- pca(iris, scale = TRUE, sup_row = sample(150, 10), sup_col = 2)
#> 1 qualitative variable was removed: Species.
## Get row coordinates
head(get_coordinates(X, margin = 1))
#> F1 F2 .sup
#> 1 -1.960289 0.29289248 FALSE
#> 2 -2.095123 0.09662184 FALSE
#> 3 -2.263363 -0.08499521 FALSE
#> 4 -2.263966 -0.21243774 FALSE
#> 5 -2.027706 0.19475716 FALSE
#> 6 -1.505932 0.40745304 FALSE
## Get column coordinates
head(get_coordinates(X, margin = 2))
#> F1 F2 .sup
#> Sepal.Length 0.9300371 0.3664032 FALSE
#> Petal.Length 0.9837931 -0.1167922 FALSE
#> Petal.Width 0.9658332 -0.2338595 FALSE
#> Sepal.Width -0.3266602 0.4670234 TRUE
## Get correlations between variables and dimensions
head(get_correlations(X))
#> F1 F2 .sup
#> Sepal.Length 0.9300371 0.3664032 FALSE
#> Petal.Length 0.9837931 -0.1167922 FALSE
#> Petal.Width 0.9658332 -0.2338595 FALSE
#> Sepal.Width -0.3266602 0.4670234 TRUE
## Get eigenvalues
get_eigenvalues(X)
#> eigenvalues variance cumulative
#> F1 2.765652 93.174999 93.175
#> F2 0.202582 6.825001 100.000