We’ll use the BOMDELBOM Deta set

Taking Subset of Numeric Variables

##   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

Package stats has a function factanal() can be used to perform factor analysis

## 
## Call:
## factanal(x = Sub_BOMDELBOM, factors = n.factors, scores = c("regression"),     rotation = "none")
## 
## Uniquenesses:
##       FlyingMinutes            Capacity           SeatPitch           SeatWidth 
##                0.97                0.65                0.00                0.00 
##               Price AdvancedBookingDays         MarketShare          LoadFactor 
##                0.99                1.00                0.31                0.49 
## 
## Loadings:
##                     Factor1 Factor2
## Capacity             0.59          
## SeatPitch            0.81   -0.58  
## SeatWidth            0.81    0.58  
## MarketShare          0.36    0.75  
## LoadFactor          -0.39    0.60  
## FlyingMinutes                      
## Price                              
## AdvancedBookingDays                
## 
##                Factor1 Factor2
## SS loadings       1.96    1.64
## Proportion Var    0.24    0.20
## Cumulative Var    0.24    0.45
## 
## Test of the hypothesis that 2 factors are sufficient.
## The chi square statistic is 153.21 on 13 degrees of freedom.
## The p-value is 4.64e-26

varimax rotation

##                         Factor1     Factor2
## FlyingMinutes       -0.02744605 -0.18256077
## Capacity             0.49399400  0.32676786
## SeatPitch            0.99669918  0.04002925
## SeatWidth            0.28209404  0.95678310
## Price                0.07904794 -0.08653190
## AdvancedBookingDays -0.01683792  0.06225741
## MarketShare         -0.18464260  0.81139640
## LoadFactor          -0.67490484  0.23447409

Visualization and Interpretation

Determining the Number of Factors to Extract

## Warning: package 'psy' was built under R version 4.0.3