It goes faint and produces this (text only)
---
title: "Principal Component Analysis"
author: "Dataset pca_t6"
output:
html_document: default
---
This dataset contains 64 individuals and 8 variables, 1 qualitative variable is considered as illustrative.
- - -
```{r, echo = FALSE}
library(FactoMineR)
load('C:/Debate/Workspace.RData')
```
### 1. Study of the outliers
The analysis of the graphs does not detect any outlier.
- - -
### 2. Inertia distribution
The inertia of the first dimensions shows if there are strong relationships between variables and suggests the number of dimensions that should be studied.
The first two dimensions of analyse express **54.73%** of the total dataset inertia ; that means that 54.73% of the individuals (or variables) cloud total variability is explained by the plane.
This percentage is relatively high and thus the first plane well represents the data variability.
This value is greater than the reference value that equals **43.13%**, the variability explained by this plane is thus significant
(the reference value is the 0.95-quantile of the inertia percentages distribution obtained by simulating 8980 data tables of equivalent size on the basis of a normal distribution).
From these observations, it should be better to also interpret the dimensions greater or equal to the third one.
```{r, echo = FALSE, fig.align = 'center', fig.height = 3.5, fig.width = 5.5}
par(mar = c(2.6, 4.1, 1.1, 2.1))
ggplot2::ggplot(cbind.data.frame(x=1:nrow(res$eig),y=res$eig[,2])) + ggplot2::aes(x=x, y=y)+ ggplot2::geom_col(fill="blue") + ggplot2::xlab("Dimension") + ggplot2::ylab("Percentage of variance") + ggplot2::ggtitle("Decomposition of the total inertia") + ggplot2::theme_light() + ggplot2::theme(plot.title = ggplot2::element_text(hjust =0.5)) + ggplot2::scale_x_continuous(breaks=1:nrow(res$eig))
```
**Figure 2 - Decomposition of the total inertia**
An estimation of the right number of axis to interpret suggests to restrict the analysis to the description of the first 3 axis.
These axis present an amount of inertia greater than those obtained by the 0.95-quantile of random distributions (72.8% against 59.22%).
This observation suggests that only these axis are carrying a real information.
As a consequence, the description will stand to these axis.
- - -
### 3. Description of the plane 1:2
```{r, echo = FALSE, fig.align = 'center', fig.height = 3.5, fig.width = 5.5}
drawn <-
c("53", "39", "3", "62", "14", "43", "59", "10", "49", "21",
"64", "45", "47", "57", "35", "13", "40", "20", "52", "33")
par(mar = c(4.1, 4.1, 1.1, 2.1))
plot.PCA(res, select = drawn, axes = c(1,2), choix = 'ind', invisible = 'quali', title = '', cex = cex)
```
**Figure 3.1 - Individuals factor map (PCA)**
*The labeled individuals are those with the higher contribution to the plane construction.*