## taking subset of numeric variables
BOMDELBOM.active <- BOMDELBOM.df[,c(8,11,12,13,17,18,22,23)]
head(BOMDELBOM.active)## FlyingMinutes Capacity SeatPitch SeatWidth Price AdvancedBookingDays
## 1 130 156 30 17 4051 54
## 2 125 156 30 17 11587 52
## 3 135 189 29 17 3977 48
## 4 135 180 30 18 4234 59
## 5 130 189 29 17 6837 48
## 6 130 156 30 17 6518 52
## MarketShare LoadFactor
## 1 15.4 83.32
## 2 15.4 83.32
## 3 13.2 94.06
## 4 39.6 87.20
## 5 13.2 94.06
## 6 15.4 83.32
## **Results for the Principal Component Analysis (PCA)**
## The analysis was performed on 305 individuals, described by 8 variables
## *The results are available in the following objects:
##
## name description
## 1 "$eig" "eigenvalues"
## 2 "$var" "results for the variables"
## 3 "$var$coord" "coord. for the variables"
## 4 "$var$cor" "correlations variables - dimensions"
## 5 "$var$cos2" "cos2 for the variables"
## 6 "$var$contrib" "contributions of the variables"
## 7 "$ind" "results for the individuals"
## 8 "$ind$coord" "coord. for the individuals"
## 9 "$ind$cos2" "cos2 for the individuals"
## 10 "$ind$contrib" "contributions of the individuals"
## 11 "$call" "summary statistics"
## 12 "$call$centre" "mean of the variables"
## 13 "$call$ecart.type" "standard error of the variables"
## 14 "$call$row.w" "weights for the individuals"
## 15 "$call$col.w" "weights for the variables"
# We’ll use the factoextra R package to help in the interpretation of PCA. No matter what function you decide to use
# These functions include:
#get_eigenvalue(res.pca): Extract the eigenvalues/variances of principal components
#fviz_eig(res.pca): Visualize the eigenvalues
#get_pca_ind(res.pca), get_pca_var(res.pca): Extract the results for individuals and variables, respectively.
#fviz_pca_ind(res.pca), fviz_pca_var(res.pca): Visualize the results individuals and variables, respectively.
#fviz_pca_biplot(res.pca): Make a biplot of individuals and variables.
#In the next sections, we’ll illustrate each of these functions.## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 2.1127851 26.409814 26.40981
## Dim.2 1.8913123 23.641404 50.05122
## Dim.3 1.1626064 14.532580 64.58380
## Dim.4 0.9897769 12.372211 76.95601
## Dim.5 0.9520241 11.900302 88.85631
## Dim.6 0.6108899 7.636124 96.49243
## Dim.7 0.1660760 2.075950 98.56838
## Dim.8 0.1145292 1.431615 100.00000
## Principal Component Analysis Results for variables
## ===================================================
## Name Description
## 1 "$coord" "Coordinates for the variables"
## 2 "$cor" "Correlations between variables and dimensions"
## 3 "$cos2" "Cos2 for the variables"
## 4 "$contrib" "contributions of the variables"
## Warning: package 'corrplot' was built under R version 4.0.3
## corrplot 0.84 loaded