To interpret the behaviour of customers on considering the cereal brands based on their characteristics. Based on the analysis, trying to understand the underlying similarities between the variables and converting them into factors for further analysis.

Loading the dataset

cereal <- read.csv("D:/PGP BA-BI Course Materials/ADVANCED STATISTICS/GROUP ASSIGNMENT/cereal.csv", header = TRUE, sep = ",")
head(cereal,10)
##        Cereals Filling Natural Fibre Sweet Easy Salt Satisfying Energy Fun
## 1     Weetabix       5       5     5     1    2    1          5      4   1
## 2     SpecialK       1       2     2     1    5    2          5      1   1
## 3     SpecialK       5       4     5     5    5    3          5      5   5
## 4      CMuesli       5       5     5     3    5    2          5      5   5
## 5   CornFlakes       4       5     3     2    5    2          5      4   5
## 6  RiceBubbles       4       4     4     2    5    2          5      4   5
## 7     SpecialK       4       4     3     2    5    1          5      5   5
## 8     SpecialK       4       3     3     2    5    1          5      4   4
## 9  RiceBubbles       4       3     3     2    5    1          5      4   4
## 10  CornFlakes       4       3     3     2    5    1          5      4   4
##    Kids Soggy Economical Health Family Calories Plain Crisp Regular Sugar
## 1     4     5          5      5      5        1     3     1       4     1
## 2     5     3          5      2      5        1     5     5       1     2
## 3     5     3          3      5      5        1     1     5       4     3
## 4     5     3          3      5      5        1     1     1       4     2
## 5     5     1          5      5      3        3     1     5       3     1
## 6     5     1          5      4      5        3     1     5       3     2
## 7     5     1          5      5      5        3     1     5       3     2
## 8     5     1          3      4      5        2     3     4       4     1
## 9     5     1          3      4      5        2     3     4       4     1
## 10    5     1          3      4      5        2     3     4       4     1
##    Fruit Process Quality Treat Boring Nutritious
## 1      1       3       5     1      1          5
## 2      1       5       2     1      1          3
## 3      1       2       5     4      1          5
## 4      5       2       5     5      1          5
## 5      1       3       5     5      1          4
## 6      1       3       5     5      1          4
## 7      1       3       5     5      1          4
## 8      1       2       4     2      1          3
## 9      1       2       4     2      1          3
## 10     1       2       4     2      1          3

Exploratory Data Analysis

Summary of the data

summary(cereal)
##         Cereals      Filling         Natural          Fibre      
##  CornFlakes :27   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  Weetabix   :27   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000  
##  Vitabrit   :25   Median :4.000   Median :4.000   Median :4.000  
##  NutriGrain :24   Mean   :3.881   Mean   :3.783   Mean   :3.528  
##  SpecialK   :23   3rd Qu.:4.500   3rd Qu.:4.000   3rd Qu.:4.000  
##  RiceBubbles:21   Max.   :5.000   Max.   :5.000   Max.   :5.000  
##  (Other)    :88                                                  
##      Sweet            Easy            Salt         Satisfying   
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :2.000  
##  1st Qu.:2.000   1st Qu.:4.000   1st Qu.:1.000   1st Qu.:3.000  
##  Median :2.000   Median :5.000   Median :2.000   Median :4.000  
##  Mean   :2.506   Mean   :4.532   Mean   :1.991   Mean   :4.004  
##  3rd Qu.:3.000   3rd Qu.:5.000   3rd Qu.:3.000   3rd Qu.:5.000  
##  Max.   :5.000   Max.   :6.000   Max.   :4.000   Max.   :6.000  
##                                                                 
##      Energy           Fun             Kids           Soggy      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:2.000   1st Qu.:3.000   1st Qu.:1.000  
##  Median :4.000   Median :2.000   Median :4.000   Median :2.000  
##  Mean   :3.643   Mean   :2.617   Mean   :3.843   Mean   :2.255  
##  3rd Qu.:4.000   3rd Qu.:3.000   3rd Qu.:5.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :6.000   Max.   :5.000  
##                                                                 
##    Economical        Health          Family         Calories    
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:3.000   1st Qu.:3.000   1st Qu.:3.000   1st Qu.:2.000  
##  Median :3.000   Median :4.000   Median :4.000   Median :3.000  
##  Mean   :3.217   Mean   :3.809   Mean   :3.877   Mean   :2.702  
##  3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:5.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :5.000   Max.   :6.000   Max.   :5.000  
##                                                                 
##      Plain           Crisp          Regular          Sugar      
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.000  
##  1st Qu.:1.000   1st Qu.:2.000   1st Qu.:2.000   1st Qu.:1.000  
##  Median :2.000   Median :3.000   Median :3.000   Median :2.000  
##  Mean   :2.268   Mean   :3.204   Mean   :3.072   Mean   :2.145  
##  3rd Qu.:3.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:3.000  
##  Max.   :5.000   Max.   :6.000   Max.   :5.000   Max.   :5.000  
##                                                                 
##      Fruit          Process         Quality          Treat     
##  Min.   :1.000   Min.   :1.000   Min.   :1.000   Min.   :1.00  
##  1st Qu.:1.000   1st Qu.:2.000   1st Qu.:3.000   1st Qu.:2.00  
##  Median :1.000   Median :3.000   Median :4.000   Median :3.00  
##  Mean   :1.694   Mean   :2.936   Mean   :3.694   Mean   :2.63  
##  3rd Qu.:3.000   3rd Qu.:4.000   3rd Qu.:4.000   3rd Qu.:3.00  
##  Max.   :5.000   Max.   :6.000   Max.   :5.000   Max.   :6.00  
##                                                                
##      Boring       Nutritious   
##  Min.   :1.00   Min.   :1.000  
##  1st Qu.:1.00   1st Qu.:3.000  
##  Median :2.00   Median :4.000  
##  Mean   :1.83   Mean   :3.664  
##  3rd Qu.:2.00   3rd Qu.:4.000  
##  Max.   :5.00   Max.   :5.000  
## 

Structure of the data

str(cereal)
## 'data.frame':    235 obs. of  26 variables:
##  $ Cereals   : Factor w/ 12 levels "AllBran","CMuesli",..: 12 9 9 2 3 8 9 9 8 3 ...
##  $ Filling   : int  5 1 5 5 4 4 4 4 4 4 ...
##  $ Natural   : int  5 2 4 5 5 4 4 3 3 3 ...
##  $ Fibre     : int  5 2 5 5 3 4 3 3 3 3 ...
##  $ Sweet     : int  1 1 5 3 2 2 2 2 2 2 ...
##  $ Easy      : int  2 5 5 5 5 5 5 5 5 5 ...
##  $ Salt      : int  1 2 3 2 2 2 1 1 1 1 ...
##  $ Satisfying: int  5 5 5 5 5 5 5 5 5 5 ...
##  $ Energy    : int  4 1 5 5 4 4 5 4 4 4 ...
##  $ Fun       : int  1 1 5 5 5 5 5 4 4 4 ...
##  $ Kids      : int  4 5 5 5 5 5 5 5 5 5 ...
##  $ Soggy     : int  5 3 3 3 1 1 1 1 1 1 ...
##  $ Economical: int  5 5 3 3 5 5 5 3 3 3 ...
##  $ Health    : int  5 2 5 5 5 4 5 4 4 4 ...
##  $ Family    : int  5 5 5 5 3 5 5 5 5 5 ...
##  $ Calories  : int  1 1 1 1 3 3 3 2 2 2 ...
##  $ Plain     : int  3 5 1 1 1 1 1 3 3 3 ...
##  $ Crisp     : int  1 5 5 1 5 5 5 4 4 4 ...
##  $ Regular   : int  4 1 4 4 3 3 3 4 4 4 ...
##  $ Sugar     : int  1 2 3 2 1 2 2 1 1 1 ...
##  $ Fruit     : int  1 1 1 5 1 1 1 1 1 1 ...
##  $ Process   : int  3 5 2 2 3 3 3 2 2 2 ...
##  $ Quality   : int  5 2 5 5 5 5 5 4 4 4 ...
##  $ Treat     : int  1 1 4 5 5 5 5 2 2 2 ...
##  $ Boring    : int  1 1 1 1 1 1 1 1 1 1 ...
##  $ Nutritious: int  5 3 5 5 4 4 4 3 3 3 ...

It has been observed that there are 235 observations and 26 variables of the 12 different brands of cereals. All the attributes are ‘ordinal’ and has been marked on the scale between 1-5, but few variables mistakenly entered as 6. Hence, need to be corrected.

cereal[cereal==6] <- 5

Creating a correlation matrix and correlation plot

cereal1 <- cereal[,-1]
cor.cereal <- cor(cereal1)
round(cor.cereal,2)
##            Filling Natural Fibre Sweet  Easy  Salt Satisfying Energy   Fun
## Filling       1.00    0.54  0.55  0.19  0.24 -0.04       0.65   0.64  0.27
## Natural       0.54    1.00  0.65 -0.09  0.23 -0.22       0.47   0.49  0.08
## Fibre         0.55    0.65  1.00 -0.04  0.18 -0.17       0.41   0.50  0.06
## Sweet         0.19   -0.09 -0.04  1.00  0.12  0.44       0.18   0.18  0.33
## Easy          0.24    0.23  0.18  0.12  1.00  0.01       0.35   0.18  0.24
## Salt         -0.04   -0.22 -0.17  0.44  0.01  1.00      -0.01  -0.07  0.03
## Satisfying    0.65    0.47  0.41  0.18  0.35 -0.01       1.00   0.60  0.35
## Energy        0.64    0.49  0.50  0.18  0.18 -0.07       0.60   1.00  0.35
## Fun           0.27    0.08  0.06  0.33  0.24  0.03       0.35   0.35  1.00
## Kids          0.16    0.06 -0.09  0.12  0.24  0.02       0.30   0.13  0.34
## Soggy        -0.06    0.07 -0.04 -0.08 -0.01  0.02      -0.01  -0.05 -0.10
## Economical    0.05    0.10 -0.03 -0.24  0.09 -0.13       0.21   0.03  0.04
## Health        0.55    0.69  0.68 -0.12  0.20 -0.23       0.52   0.52  0.10
## Family        0.23    0.11 -0.01  0.04  0.23 -0.09       0.35   0.19  0.35
## Calories      0.05   -0.16 -0.19  0.47 -0.02  0.44       0.01   0.03  0.11
## Plain        -0.25   -0.14 -0.12 -0.29  0.02  0.02      -0.18  -0.26 -0.32
## Crisp         0.13    0.02  0.05  0.26  0.24  0.10       0.26   0.25  0.40
## Regular       0.42    0.42  0.65 -0.03  0.11 -0.16       0.33   0.39  0.14
## Sugar        -0.08   -0.32 -0.23  0.65 -0.02  0.59      -0.09  -0.09  0.17
## Fruit         0.26    0.30  0.29  0.35  0.04  0.03       0.25   0.27  0.25
## Process      -0.23   -0.31 -0.19  0.11 -0.07  0.30      -0.19  -0.10 -0.01
## Quality       0.44    0.58  0.51 -0.08  0.16 -0.22       0.47   0.46  0.22
## Treat         0.34    0.17  0.14  0.37  0.18  0.12       0.37   0.32  0.58
## Boring       -0.18   -0.22 -0.10 -0.20 -0.17  0.11      -0.32  -0.22 -0.30
## Nutritious    0.53    0.65  0.71 -0.05  0.20 -0.16       0.50   0.54  0.16
##             Kids Soggy Economical Health Family Calories Plain Crisp
## Filling     0.16 -0.06       0.05   0.55   0.23     0.05 -0.25  0.13
## Natural     0.06  0.07       0.10   0.69   0.11    -0.16 -0.14  0.02
## Fibre      -0.09 -0.04      -0.03   0.68  -0.01    -0.19 -0.12  0.05
## Sweet       0.12 -0.08      -0.24  -0.12   0.04     0.47 -0.29  0.26
## Easy        0.24 -0.01       0.09   0.20   0.23    -0.02  0.02  0.24
## Salt        0.02  0.02      -0.13  -0.23  -0.09     0.44  0.02  0.10
## Satisfying  0.30 -0.01       0.21   0.52   0.35     0.01 -0.18  0.26
## Energy      0.13 -0.05       0.03   0.52   0.19     0.03 -0.26  0.25
## Fun         0.34 -0.10       0.04   0.10   0.35     0.11 -0.32  0.40
## Kids        1.00  0.09       0.30  -0.01   0.72     0.01  0.03  0.29
## Soggy       0.09  1.00       0.12   0.01   0.08    -0.08  0.35 -0.34
## Economical  0.30  0.12       1.00   0.19   0.23    -0.21  0.23  0.09
## Health     -0.01  0.01       0.19   1.00   0.08    -0.31 -0.10  0.08
## Family      0.72  0.08       0.23   0.08   1.00    -0.07 -0.03  0.28
## Calories    0.01 -0.08      -0.21  -0.31  -0.07     1.00 -0.08  0.14
## Plain       0.03  0.35       0.23  -0.10  -0.03    -0.08  1.00 -0.21
## Crisp       0.29 -0.34       0.09   0.08   0.28     0.14 -0.21  1.00
## Regular    -0.03 -0.14       0.08   0.54   0.04    -0.16 -0.08  0.13
## Sugar      -0.02 -0.09      -0.29  -0.38  -0.06     0.53 -0.15  0.16
## Fruit      -0.23 -0.14      -0.34   0.27  -0.13     0.13 -0.34  0.09
## Process     0.01  0.06      -0.13  -0.29  -0.03     0.27  0.12  0.01
## Quality     0.11 -0.03       0.22   0.69   0.24    -0.20 -0.23  0.13
## Treat       0.28 -0.26      -0.04   0.22   0.29     0.19 -0.43  0.46
## Boring     -0.20  0.23      -0.02  -0.23  -0.25    -0.03  0.33 -0.33
## Nutritious  0.03  0.03       0.13   0.76   0.09    -0.23 -0.14  0.10
##            Regular Sugar Fruit Process Quality Treat Boring Nutritious
## Filling       0.42 -0.08  0.26   -0.23    0.44  0.34  -0.18       0.53
## Natural       0.42 -0.32  0.30   -0.31    0.58  0.17  -0.22       0.65
## Fibre         0.65 -0.23  0.29   -0.19    0.51  0.14  -0.10       0.71
## Sweet        -0.03  0.65  0.35    0.11   -0.08  0.37  -0.20      -0.05
## Easy          0.11 -0.02  0.04   -0.07    0.16  0.18  -0.17       0.20
## Salt         -0.16  0.59  0.03    0.30   -0.22  0.12   0.11      -0.16
## Satisfying    0.33 -0.09  0.25   -0.19    0.47  0.37  -0.32       0.50
## Energy        0.39 -0.09  0.27   -0.10    0.46  0.32  -0.22       0.54
## Fun           0.14  0.17  0.25   -0.01    0.22  0.58  -0.30       0.16
## Kids         -0.03 -0.02 -0.23    0.01    0.11  0.28  -0.20       0.03
## Soggy        -0.14 -0.09 -0.14    0.06   -0.03 -0.26   0.23       0.03
## Economical    0.08 -0.29 -0.34   -0.13    0.22 -0.04  -0.02       0.13
## Health        0.54 -0.38  0.27   -0.29    0.69  0.22  -0.23       0.76
## Family        0.04 -0.06 -0.13   -0.03    0.24  0.29  -0.25       0.09
## Calories     -0.16  0.53  0.13    0.27   -0.20  0.19  -0.03      -0.23
## Plain        -0.08 -0.15 -0.34    0.12   -0.23 -0.43   0.33      -0.14
## Crisp         0.13  0.16  0.09    0.01    0.13  0.46  -0.33       0.10
## Regular       1.00 -0.09  0.25   -0.15    0.44  0.17  -0.09       0.57
## Sugar        -0.09  1.00  0.15    0.37   -0.26  0.21   0.00      -0.27
## Fruit         0.25  0.15  1.00   -0.14    0.16  0.31  -0.26       0.31
## Process      -0.15  0.37 -0.14    1.00   -0.19  0.02   0.17      -0.29
## Quality       0.44 -0.26  0.16   -0.19    1.00  0.33  -0.28       0.66
## Treat         0.17  0.21  0.31    0.02    0.33  1.00  -0.36       0.25
## Boring       -0.09  0.00 -0.26    0.17   -0.28 -0.36   1.00      -0.17
## Nutritious    0.57 -0.27  0.31   -0.29    0.66  0.25  -0.17       1.00
library(corrplot)
## Warning: package 'corrplot' was built under R version 3.4.2
## corrplot 0.84 loaded
corrplot(cor.cereal, method = "circle",bg = "grey")

From the above figure, it is clear that the most of the variables are fairly correlated.Therefore, factor analysis has to be done.

Testing the assumptions to do factor analysis

KMO test for Measuirng Sampling Accuracy(MSA)

library(psych)
cereal.KMO <- KMO(cor.cereal)
cereal.KMO
## Kaiser-Meyer-Olkin factor adequacy
## Call: KMO(r = cor.cereal)
## Overall MSA =  0.85
## MSA for each item = 
##    Filling    Natural      Fibre      Sweet       Easy       Salt 
##       0.89       0.90       0.88       0.78       0.83       0.82 
## Satisfying     Energy        Fun       Kids      Soggy Economical 
##       0.91       0.91       0.85       0.67       0.63       0.73 
##     Health     Family   Calories      Plain      Crisp    Regular 
##       0.92       0.73       0.86       0.82       0.83       0.87 
##      Sugar      Fruit    Process    Quality      Treat     Boring 
##       0.78       0.77       0.80       0.91       0.88       0.87 
## Nutritious 
##       0.92

Ideally, the overall MSA value has to be greater than 0.5 from KMO test to do factor analysis.

Barlett’s Test of Sphericity

cereal.barlett <- cortest.bartlett(cor.cereal, nrow(cereal))
cereal.barlett
## $chisq
## [1] 2877.739
## 
## $p.value
## [1] 0
## 
## $df
## [1] 300

Bartlett’s test has to be ‘significant’, telling us that the correlation matrix is not an identity matrix with the p-value <0.05. On running the test, we have obtained the p-value as 0.

Thus, based on the above results, we assume that the fair correlation exists between all the variables, so we can run the Factor Analysis on the given data set.

Running PCA to identify the number of factors

cereal.pca <- princomp(cereal1,scores = TRUE, cor = TRUE)
summary(cereal.pca)
## Importance of components:
##                           Comp.1    Comp.2     Comp.3     Comp.4
## Standard deviation     2.5515645 1.9473508 1.57931249 1.29699429
## Proportion of Variance 0.2604193 0.1516870 0.09976912 0.06728777
## Cumulative Proportion  0.2604193 0.4121063 0.51187538 0.57916315
##                            Comp.5     Comp.6     Comp.7     Comp.8
## Standard deviation     1.04196617 0.97215571 0.92371682 0.88941254
## Proportion of Variance 0.04342774 0.03780347 0.03413011 0.03164219
## Cumulative Proportion  0.62259089 0.66039436 0.69452447 0.72616666
##                            Comp.9    Comp.10    Comp.11    Comp.12
## Standard deviation     0.85594266 0.83528812 0.80508009 0.74210795
## Proportion of Variance 0.02930551 0.02790825 0.02592616 0.02202897
## Cumulative Proportion  0.75547217 0.78338042 0.80930658 0.83133555
##                           Comp.13    Comp.14   Comp.15    Comp.16
## Standard deviation     0.72900837 0.69819277 0.6456121 0.62203549
## Proportion of Variance 0.02125813 0.01949893 0.0166726 0.01547713
## Cumulative Proportion  0.85259368 0.87209260 0.8887652 0.90424233
##                           Comp.17    Comp.18    Comp.19    Comp.20
## Standard deviation     0.60340597 0.60072703 0.55329582 0.52496345
## Proportion of Variance 0.01456395 0.01443492 0.01224545 0.01102346
## Cumulative Proportion  0.91880628 0.93324119 0.94548664 0.95651011
##                           Comp.21     Comp.22     Comp.23     Comp.24
## Standard deviation     0.51267066 0.492791255 0.467311607 0.445682156
## Proportion of Variance 0.01051325 0.009713729 0.008735206 0.007945303
## Cumulative Proportion  0.96702336 0.976737086 0.985472292 0.993417595
##                            Comp.25
## Standard deviation     0.405660102
## Proportion of Variance 0.006582405
## Cumulative Proportion  1.000000000

Interpretations from the above values,

According to KMO statistics concept, all principal component values which has an Eigen value of greater than 1, can be taken into consideration for the dimension reduction technique.

Based on that criteria, in our case we will take first 5 principal components into consideration.

From the output values, Comp 1 explains 26% of variation of the whole data set, likewise Comp 2 explains 15%, Comp 3 explains 10%, Comp 4 explians 7% and Comp 5 explains 4% of variation of the entire data set.

Therefore, it implies PCA1 to PCA5 itself are able to explain 62% of the data.

Plot of principal components with variance

plot(cereal.pca,col = "black")

From the above plot, after Comp 5 the bar flattens and there is no further steep.

Screeplot of principal components vs variances

screeplot(cereal.pca,type = "lines",main = "Screeplot")

In the above Screeplot , after the Comp 5 which is above Eigen value(Variances) 1,the “Elbow” shape becomes a line and flattens.

loadings(cereal.pca)
## 
## Loadings:
##            Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7 Comp.8 Comp.9
## Filling    -0.293               -0.176  0.107         0.232 -0.406       
## Natural    -0.294  0.132        -0.101  0.139                      -0.210
## Fibre      -0.287  0.123  0.210 -0.138 -0.155        -0.148 -0.119       
## Sweet             -0.398  0.117 -0.143  0.155  0.114                0.178
## Easy       -0.136        -0.171 -0.121         0.667 -0.478        -0.163
## Salt              -0.280        -0.373 -0.127  0.109  0.210  0.220       
## Satisfying -0.292        -0.108 -0.152  0.101  0.124  0.182 -0.110       
## Energy     -0.285               -0.131        -0.128  0.112 -0.297 -0.104
## Fun        -0.161 -0.270 -0.162  0.113        -0.175 -0.230         0.353
## Kids              -0.129 -0.498               -0.103        -0.139       
## Soggy              0.142 -0.113 -0.446  0.479 -0.173 -0.173  0.311  0.103
## Economical         0.147 -0.366        -0.237         0.458  0.349  0.162
## Health     -0.318  0.161                                     0.193       
## Family     -0.124        -0.460         0.137 -0.199 -0.120 -0.172       
## Calories          -0.324  0.110 -0.216                0.280 -0.101 -0.259
## Plain       0.129  0.208 -0.158 -0.374 -0.143  0.232 -0.120              
## Crisp      -0.121 -0.252 -0.171  0.185 -0.402  0.186                     
## Regular    -0.243         0.142        -0.381        -0.142         0.359
## Sugar             -0.384  0.142 -0.201                       0.114  0.113
## Fruit      -0.154 -0.148  0.342  0.111  0.282        -0.185  0.189  0.178
## Process     0.134 -0.155        -0.263 -0.339 -0.409 -0.364        -0.480
## Quality    -0.295                             -0.225         0.307 -0.206
## Treat      -0.190 -0.302         0.150        -0.190         0.155       
## Boring      0.162  0.152        -0.334 -0.158 -0.153        -0.361  0.418
## Nutritious -0.316  0.116  0.102 -0.114                       0.167       
##            Comp.10 Comp.11 Comp.12 Comp.13 Comp.14 Comp.15 Comp.16 Comp.17
## Filling                    -0.109           0.108  -0.111           0.278 
## Natural                     0.281   0.110           0.272  -0.379   0.167 
## Fibre      -0.177                          -0.139          -0.213   0.197 
## Sweet      -0.130          -0.227          -0.214   0.132   0.294   0.306 
## Easy        0.248  -0.230  -0.114   0.188                                 
## Salt               -0.352   0.158  -0.282   0.306  -0.206  -0.379  -0.218 
## Satisfying  0.127   0.124  -0.232  -0.108   0.348           0.170  -0.137 
## Energy      0.231   0.283  -0.117  -0.347  -0.160  -0.107          -0.157 
## Fun         0.390   0.167           0.163          -0.312  -0.344  -0.172 
## Kids       -0.298  -0.116   0.108                   0.132  -0.189         
## Soggy               0.121          -0.171  -0.348                         
## Economical  0.223          -0.261   0.205           0.356  -0.132   0.102 
## Health                                                      0.124   0.109 
## Family     -0.369                           0.141           0.144  -0.243 
## Calories            0.310   0.343   0.520  -0.233                  -0.201 
## Plain      -0.173   0.458   0.179           0.261  -0.378   0.205   0.143 
## Crisp               0.261   0.358  -0.465  -0.247   0.227   0.106         
## Regular    -0.345   0.103  -0.262   0.243  -0.104                  -0.117 
## Sugar      -0.190  -0.148  -0.218          -0.141           0.118         
## Fruit               0.302                   0.462   0.427          -0.166 
## Process     0.131   0.132  -0.238           0.173   0.227           0.137 
## Quality            -0.225           0.159  -0.109  -0.102   0.425  -0.362 
## Treat       0.198  -0.124   0.300   0.179   0.191  -0.181   0.163   0.512 
## Boring      0.359  -0.227   0.299                   0.330   0.218         
## Nutritious         -0.105   0.156                                  -0.125 
##            Comp.18 Comp.19 Comp.20 Comp.21 Comp.22 Comp.23 Comp.24 Comp.25
## Filling    -0.188  -0.268           0.416   0.124   0.413  -0.230         
## Natural     0.223  -0.437          -0.335                           0.315 
## Fibre                       0.339   0.183  -0.277  -0.503  -0.189  -0.344 
## Sweet       0.381   0.169   0.120   0.101   0.227  -0.213           0.331 
## Easy                       -0.191                                         
## Salt                       -0.121   0.120   0.159  -0.131                 
## Satisfying -0.313           0.412  -0.465          -0.150                 
## Energy      0.314          -0.519  -0.141  -0.112  -0.115          -0.116 
## Fun         0.182  -0.135   0.324   0.105                   0.102         
## Kids        0.203   0.356          -0.221   0.245   0.248          -0.394 
## Soggy      -0.419                                                         
## Economical                 -0.117   0.160  -0.178                         
## Health                              0.192   0.226           0.767  -0.270 
## Family             -0.219  -0.143   0.309  -0.267  -0.272   0.186   0.248 
## Calories   -0.121   0.203                                   0.160         
## Plain       0.283  -0.135                                  -0.125         
## Crisp      -0.210  -0.174   0.126           0.108                         
## Regular    -0.283          -0.270  -0.178   0.305                   0.188 
## Sugar              -0.395          -0.252  -0.421   0.268   0.136  -0.338 
## Fruit                      -0.127   0.144                  -0.160  -0.217 
## Process                             0.102                           0.118 
## Quality     0.160  -0.160                   0.261          -0.380  -0.136 
## Treat      -0.204          -0.316  -0.211  -0.151  -0.149                 
## Boring      0.101                                                         
## Nutritious          0.461                  -0.461   0.453           0.332 
## 
##                Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7 Comp.8
## SS loadings      1.00   1.00   1.00   1.00   1.00   1.00   1.00   1.00
## Proportion Var   0.04   0.04   0.04   0.04   0.04   0.04   0.04   0.04
## Cumulative Var   0.04   0.08   0.12   0.16   0.20   0.24   0.28   0.32
##                Comp.9 Comp.10 Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## SS loadings      1.00    1.00    1.00    1.00    1.00    1.00    1.00
## Proportion Var   0.04    0.04    0.04    0.04    0.04    0.04    0.04
## Cumulative Var   0.36    0.40    0.44    0.48    0.52    0.56    0.60
##                Comp.16 Comp.17 Comp.18 Comp.19 Comp.20 Comp.21 Comp.22
## SS loadings       1.00    1.00    1.00    1.00    1.00    1.00    1.00
## Proportion Var    0.04    0.04    0.04    0.04    0.04    0.04    0.04
## Cumulative Var    0.64    0.68    0.72    0.76    0.80    0.84    0.88
##                Comp.23 Comp.24 Comp.25
## SS loadings       1.00    1.00    1.00
## Proportion Var    0.04    0.04    0.04
## Cumulative Var    0.92    0.96    1.00
print(cereal.pca$loadings, cutoff = 0.2)
## 
## Loadings:
##            Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7 Comp.8 Comp.9
## Filling    -0.293                                     0.232 -0.406       
## Natural    -0.294                                                  -0.210
## Fibre      -0.287         0.210                                          
## Sweet             -0.398                                                 
## Easy                                           0.667 -0.478              
## Salt              -0.280        -0.373                0.210  0.220       
## Satisfying -0.292                                                        
## Energy     -0.285                                           -0.297       
## Fun               -0.270                             -0.230         0.353
## Kids                     -0.498                                          
## Soggy                           -0.446  0.479                0.311       
## Economical               -0.366        -0.237         0.458  0.349       
## Health     -0.318                                                        
## Family                   -0.460                                          
## Calories          -0.324        -0.216                0.280        -0.259
## Plain              0.208        -0.374         0.232                     
## Crisp             -0.252               -0.402                            
## Regular    -0.243                      -0.381                       0.359
## Sugar             -0.384        -0.201                                   
## Fruit                     0.342         0.282                            
## Process                         -0.263 -0.339 -0.409 -0.364        -0.480
## Quality    -0.295                             -0.225         0.307 -0.206
## Treat             -0.302                                                 
## Boring                          -0.334                      -0.361  0.418
## Nutritious -0.316                                                        
##            Comp.10 Comp.11 Comp.12 Comp.13 Comp.14 Comp.15 Comp.16 Comp.17
## Filling                                                             0.278 
## Natural                     0.281                   0.272  -0.379         
## Fibre                                                      -0.213         
## Sweet                      -0.227          -0.214           0.294   0.306 
## Easy        0.248  -0.230                                                 
## Salt               -0.352          -0.282   0.306  -0.206  -0.379  -0.218 
## Satisfying                 -0.232           0.348                         
## Energy      0.231   0.283          -0.347                                 
## Fun         0.390                                  -0.312  -0.344         
## Kids       -0.298                                                         
## Soggy                                      -0.348                         
## Economical  0.223          -0.261   0.205           0.356                 
## Health                                                                    
## Family     -0.369                                                  -0.243 
## Calories            0.310   0.343   0.520  -0.233                  -0.201 
## Plain               0.458                   0.261  -0.378   0.205         
## Crisp               0.261   0.358  -0.465  -0.247   0.227                 
## Regular    -0.345          -0.262   0.243                                 
## Sugar                      -0.218                                         
## Fruit               0.302                   0.462   0.427                 
## Process                    -0.238                   0.227                 
## Quality            -0.225                                   0.425  -0.362 
## Treat                       0.300                                   0.512 
## Boring      0.359  -0.227   0.299                   0.330   0.218         
## Nutritious                                                                
##            Comp.18 Comp.19 Comp.20 Comp.21 Comp.22 Comp.23 Comp.24 Comp.25
## Filling            -0.268           0.416           0.413  -0.230         
## Natural     0.223  -0.437          -0.335                           0.315 
## Fibre                       0.339          -0.277  -0.503          -0.344 
## Sweet       0.381                           0.227  -0.213           0.331 
## Easy                                                                      
## Salt                                                                      
## Satisfying -0.313           0.412  -0.465                                 
## Energy      0.314          -0.519                                         
## Fun                         0.324                                         
## Kids        0.203   0.356          -0.221   0.245   0.248          -0.394 
## Soggy      -0.419                                                         
## Economical                                                                
## Health                                      0.226           0.767  -0.270 
## Family             -0.219           0.309  -0.267  -0.272           0.248 
## Calories            0.203                                                 
## Plain       0.283                                                         
## Crisp      -0.210                                                         
## Regular    -0.283          -0.270           0.305                         
## Sugar              -0.395          -0.252  -0.421   0.268          -0.338 
## Fruit                                                              -0.217 
## Process                                                                   
## Quality                                     0.261          -0.380         
## Treat      -0.204          -0.316  -0.211                                 
## Boring                                                                    
## Nutritious          0.461                  -0.461   0.453           0.332 
## 
##                Comp.1 Comp.2 Comp.3 Comp.4 Comp.5 Comp.6 Comp.7 Comp.8
## SS loadings      1.00   1.00   1.00   1.00   1.00   1.00   1.00   1.00
## Proportion Var   0.04   0.04   0.04   0.04   0.04   0.04   0.04   0.04
## Cumulative Var   0.04   0.08   0.12   0.16   0.20   0.24   0.28   0.32
##                Comp.9 Comp.10 Comp.11 Comp.12 Comp.13 Comp.14 Comp.15
## SS loadings      1.00    1.00    1.00    1.00    1.00    1.00    1.00
## Proportion Var   0.04    0.04    0.04    0.04    0.04    0.04    0.04
## Cumulative Var   0.36    0.40    0.44    0.48    0.52    0.56    0.60
##                Comp.16 Comp.17 Comp.18 Comp.19 Comp.20 Comp.21 Comp.22
## SS loadings       1.00    1.00    1.00    1.00    1.00    1.00    1.00
## Proportion Var    0.04    0.04    0.04    0.04    0.04    0.04    0.04
## Cumulative Var    0.64    0.68    0.72    0.76    0.80    0.84    0.88
##                Comp.23 Comp.24 Comp.25
## SS loadings       1.00    1.00    1.00
## Proportion Var    0.04    0.04    0.04
## Cumulative Var    0.92    0.96    1.00

Biplot of components

biplot(cereal.pca, choices = c(1,2))

From the loadings, we are able to interpret that Filling,Natural,Fibre,Satisfying,Energy,Health,Regular,Quality, Nutritious are the variables that are added and gives the weightage to Comp 1.

Similarly, we can identify the variables that adds weightage in the Comps 2,3,4,5.

Running Factor Analysis

Factor analysis without rotation

factanal(cereal1,factors = 5,rotation = "none")
## 
## Call:
## factanal(x = cereal1, factors = 5, rotation = "none")
## 
## Uniquenesses:
##    Filling    Natural      Fibre      Sweet       Easy       Salt 
##      0.286      0.389      0.312      0.360      0.847      0.517 
## Satisfying     Energy        Fun       Kids      Soggy Economical 
##      0.369      0.431      0.525      0.239      0.775      0.709 
##     Health     Family   Calories      Plain      Crisp    Regular 
##      0.214      0.352      0.578      0.549      0.648      0.550 
##      Sugar      Fruit    Process    Quality      Treat     Boring 
##      0.199      0.562      0.764      0.392      0.391      0.671 
## Nutritious 
##      0.241 
## 
## Loadings:
##            Factor1 Factor2 Factor3 Factor4 Factor5
## Filling     0.719   0.243           0.143  -0.338 
## Natural     0.763  -0.116                         
## Fibre       0.757  -0.113  -0.283   0.137         
## Sweet               0.757  -0.244                 
## Easy        0.289   0.188   0.168                 
## Salt       -0.258   0.495  -0.215   0.341         
## Satisfying  0.690   0.295   0.132          -0.205 
## Energy      0.682   0.237                  -0.204 
## Fun         0.287   0.533   0.191  -0.266         
## Kids        0.164   0.365   0.762   0.135         
## Soggy              -0.177   0.143   0.413         
## Economical  0.183  -0.172   0.440   0.143   0.117 
## Health      0.854  -0.177  -0.112           0.110 
## Family      0.260   0.310   0.694                 
## Calories   -0.237   0.536  -0.206   0.131  -0.134 
## Plain      -0.232  -0.352   0.187   0.480         
## Crisp       0.197   0.450   0.172  -0.233   0.164 
## Regular     0.605          -0.195           0.196 
## Sugar      -0.356   0.716  -0.325   0.185   0.147 
## Fruit       0.324   0.257  -0.447  -0.247         
## Process    -0.336   0.227           0.198   0.176 
## Quality     0.746                           0.213 
## Treat       0.368   0.589          -0.328   0.124 
## Boring     -0.314  -0.283  -0.114   0.370         
## Nutritious  0.834          -0.142           0.170 
## 
##                Factor1 Factor2 Factor3 Factor4 Factor5
## SS loadings      6.049   3.368   2.062   1.165   0.486
## Proportion Var   0.242   0.135   0.082   0.047   0.019
## Cumulative Var   0.242   0.377   0.459   0.506   0.525
## 
## Test of the hypothesis that 5 factors are sufficient.
## The chi square statistic is 318.9 on 185 degrees of freedom.
## The p-value is 3.48e-09

From the above, we observe that the variables “Easy”, “Soggy”, “Economical”, “Crisp”, “Process” and “Boring” have high ’Uniquenesses - means it does not correlate with other variables and can be used as it is.

We observe that the loadings are not very clear, hence it has to be rotated to increase the very clear interpretability. It is done to maximize the high loadings and minimize low loadings.

Factor loadings with Varimax rotation

factanal(cereal1,factors = 5,rotation = "varimax")
## 
## Call:
## factanal(x = cereal1, factors = 5, rotation = "varimax")
## 
## Uniquenesses:
##    Filling    Natural      Fibre      Sweet       Easy       Salt 
##      0.286      0.389      0.312      0.360      0.847      0.517 
## Satisfying     Energy        Fun       Kids      Soggy Economical 
##      0.369      0.431      0.525      0.239      0.775      0.709 
##     Health     Family   Calories      Plain      Crisp    Regular 
##      0.214      0.352      0.578      0.549      0.648      0.550 
##      Sugar      Fruit    Process    Quality      Treat     Boring 
##      0.199      0.562      0.764      0.392      0.391      0.671 
## Nutritious 
##      0.241 
## 
## Loadings:
##            Factor1 Factor2 Factor3 Factor4 Factor5
## Filling     0.646           0.147   0.186   0.486 
## Natural     0.731  -0.214                   0.155 
## Fibre       0.816                                 
## Sweet               0.696   0.354           0.164 
## Easy        0.228                   0.292         
## Salt                0.686                         
## Satisfying  0.571           0.202   0.369   0.355 
## Energy      0.610           0.228   0.161   0.343 
## Fun         0.126   0.155   0.545   0.364         
## Kids                                0.868         
## Soggy                      -0.452   0.138         
## Economical         -0.257  -0.190   0.410  -0.104 
## Health      0.839  -0.271                         
## Family                      0.133   0.789         
## Calories   -0.157   0.591   0.122           0.179 
## Plain      -0.115          -0.635   0.100  -0.147 
## Crisp               0.148   0.465   0.318         
## Regular     0.658                                 
## Sugar      -0.177   0.854   0.171                 
## Fruit       0.339   0.159   0.433  -0.294   0.155 
## Process    -0.218   0.380  -0.105          -0.181 
## Quality     0.682  -0.222   0.221   0.190         
## Treat       0.234   0.208   0.659   0.278         
## Boring     -0.150          -0.513  -0.193         
## Nutritious  0.849  -0.154                         
## 
##                Factor1 Factor2 Factor3 Factor4 Factor5
## SS loadings      5.044   2.583   2.440   2.353   0.711
## Proportion Var   0.202   0.103   0.098   0.094   0.028
## Cumulative Var   0.202   0.305   0.403   0.497   0.525
## 
## Test of the hypothesis that 5 factors are sufficient.
## The chi square statistic is 318.9 on 185 degrees of freedom.
## The p-value is 3.48e-09

Thus, after the rotation we observe that the 5 factors are able to explain about 52% of the data. We infer that based on the latent relation between the variables they are grouped into as “Factors”. The factor loadings explains the weightage of each variable has in the Factors. We can also see that the some of the variables are present in more than one factor, which is known as the ‘Communality’ effect.

Thus,the factor scores for all the 235 observations are known,from which prediction or classification can be done.

Naming and defining the factors

The variable that load highly on factor -

Factor 1 -‘State of well being’ Filling,Natural,Fibre,Satisfying,Energy,Health,Regular,Quality,Nutritious

The variable that load highly on factor - Factor 2 - ‘Nutritional Information’ Sweet,Salt,Calories,Sugar,Process,

The variable that load highly on factor - Factor 3 - Fun,Soggy,Crisp,Fruit,Treat,Boring,Plain - ‘Experience’

The variable that load highly on factor - Factor 4 - Kids,Economical,Family - ‘Family’

The variable that load highly on factor - Factor 5 - Filling,Satisfying,Energy - ‘Supporting variables’