You are on page 1of 19

Cereal Data Factor

Analysis

The data file labeled Cereal has the following information

As part of a study of consumer consideration of ready-to-eat cereals sponsored by


Kellogg Australia, Roberts and Lattin (1991) surveyed consumers regarding their
perceptions of their favorite brands of cereals. Each respondent was asked to evaluate
three preferred brands on each of 25 different attributes. Respondents used a five point
likert scale to indicate the extent to which each brand possessed the given attribute.

For the purpose of this assignment, a subset of the data collected by Roberts and Lattin,
reflecting the evaluations of the 12 most frequently cirted cereal brands in the sample (in
the original study, a total of 40 different brands were evaluated by 121 respondents, but
the majority of brands were rated by only a small number of consumers). The 25
attributes and 12 brands are listed below

Cereal Brand Attributes 1-12 Attributes 13-25


All Bran Filling Family
Cerola Muesli Natural Calories
Just Right Fibre Plain
Kellogg’s corn falkes Sweet Crisp
Komplete Easy Regular
Nutrigrain Salt Sugar
Purina Muesli Satisfying Fruit
Rice Bubbles Energy Process
Special K Fun Quality
Sustain Kids Treat
Vitabrit Soggy Boring
Weetbix Economical Nutritious
Health

In total 116 respondents provided 235 observations of the 12 selected brands. How do you
characterize the consideration behavior of the 12 selected brands? Analyze and interpret
yoru results using factor analysis.

Solution:

Setting the Working Directory:

setwd("F:/Stats")

getwd()

Reading Data:

Mydata=read.csv("Dataset_Cereal.csv", header=TRUE)
summary(Mydata)

Cereals Filling Natural Fibre Sweet Easy


CornFlakes :27 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
Weetabix :27 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000 1st
Vitabrit :25 Median :4.000 Median :4.000 Median :4.000 Median :2.000 Medi
NutriGrain :24 Mean :3.881 Mean :3.783 Mean :3.528 Mean :2.506 Mean
SpecialK :23 3rd Qu.:4.500 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd
RiceBubbles:21 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.
(Other) :88
Fun Kids Soggy Economical Health F
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:3.000 1st Q
Median :2.000 Median :4.000 Median :2.000 Median :3.000 Median :4.000 Media
Mean :2.617 Mean :3.843 Mean :2.255 Mean :3.217 Mean :3.809 Mean
3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :6.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Regular Sugar Fruit Process Quality Treat


Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Q
Median :3.000 Median :2.000 Median :1.000 Median :3.000 Median :4.000 Media
Mean :3.072 Mean :2.145 Mean :1.694 Mean :2.936 Mean :3.694 Mean
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :6.000 Max. :5.000 Max.

Cleaning the Data:

rm(list=ls(all=T))

gc()

used (Mb) gc trigger (Mb) max


Ncells 851589 45.5 1693465 90.5
Vcells 1475879 11.3 8388608 64.0

Loading of Data Set:

library(readxl)

Structure of the Data

cerealdata <- read.csv(file.choose(), header = TRUE)

str(cerealdata)

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

summary(cerealdata)

Cereals Filling Natural Fibre Sweet Easy


CornFlakes :27 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
Weetabix :27 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000 1st
Vitabrit :25 Median :4.000 Median :4.000 Median :4.000 Median :2.000 Medi
NutriGrain :24 Mean :3.881 Mean :3.783 Mean :3.528 Mean :2.506 Mean
SpecialK :23 3rd Qu.:4.500 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd
RiceBubbles:21 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.
(Other) :88
Fun Kids Soggy Economical Health F
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:3.000 1st Q
Median :2.000 Median :4.000 Median :2.000 Median :3.000 Median :4.000 Media
Mean :2.617 Mean :3.843 Mean :2.255 Mean :3.217 Mean :3.809 Mean
3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :6.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Regular Sugar Fruit Process Quality T


Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Q
Median :3.000 Median :2.000 Median :1.000 Median :3.000 Median :4.000 Media
Mean :3.072 Mean :2.145 Mean :1.694 Mean :2.936 Mean :3.694 Mean
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :6.000 Max. :5.000 Max.

Cleaning the Data and Verifying:

sapply(cerealdata,function(x){sum(is.na(x))})

Cereals Filling Natural Fibre Sweet Easy Salt Satisfying


0 0 0 0 0 0 0
Health Family Calories Plain Crisp Regular Sugar Frui
0 0 0 0 0 0 0

summary(cerealdata)

Cereals Filling Natural Fibre Sweet Easy


CornFlakes :27 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
Weetabix :27 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000 1st
Vitabrit :25 Median :4.000 Median :4.000 Median :4.000 Median :2.000 Medi
NutriGrain :24 Mean :3.881 Mean :3.783 Mean :3.528 Mean :2.506 Mean
SpecialK :23 3rd Qu.:4.500 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd
RiceBubbles:21 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.
(Other) :88
Fun Kids Soggy Economical Health F
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:3.000 1st Q
Median :2.000 Median :4.000 Median :2.000 Median :3.000 Median :4.000 Media
Mean :2.617 Mean :3.843 Mean :2.255 Mean :3.217 Mean :3.809 Mean
3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :6.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Regular Sugar Fruit Process Quality T


Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Q
Median :3.000 Median :2.000 Median :1.000 Median :3.000 Median :4.000 Media
Mean :3.072 Mean :2.145 Mean :1.694 Mean :2.936 Mean :3.694 Mean
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :6.000 Max. :5.000 Max.

cerealdata[cerealdata==6]<-5

summary(cerealdata)

Cereals Filling Natural Fibre Sweet Easy


CornFlakes :27 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
Weetabix :27 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000 1st
Vitabrit :25 Median :4.000 Median :4.000 Median :4.000 Median :2.000 Medi
NutriGrain :24 Mean :3.881 Mean :3.783 Mean :3.528 Mean :2.506 Mean
SpecialK :23 3rd Qu.:4.500 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd
RiceBubbles:21 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.
(Other) :88
Fun Kids Soggy Economical Health F
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:1.000 1st Qu.:3.000 1st Qu.:3.000 1st Q
Median :2.000 Median :4.000 Median :2.000 Median :3.000 Median :4.000 Media
Mean :2.617 Mean :3.838 Mean :2.255 Mean :3.217 Mean :3.809 Mean
3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Regular Sugar Fruit Process Quality T


Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Q
Median :3.000 Median :2.000 Median :1.000 Median :3.000 Median :4.000 Media
Mean :3.072 Mean :2.145 Mean :1.694 Mean :2.932 Mean :3.694 Mean
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

cerealdata[,c(12,25)]<-6-cerealdata[,c(12,25)]

summary(cerealdata)

Cereals Filling Natural Fibre Sweet Easy


CornFlakes :27 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
Weetabix :27 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:2.000 1st
Vitabrit :25 Median :4.000 Median :4.000 Median :4.000 Median :2.000 Medi
NutriGrain :24 Mean :3.881 Mean :3.783 Mean :3.528 Mean :2.506 Mean
SpecialK :23 3rd Qu.:4.500 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:3.000 3rd
RiceBubbles:21 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.
(Other) :88
Fun Kids Soggy Economical Health F
Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Qu.:3.000 1st Q
Median :2.000 Median :4.000 Median :4.000 Median :3.000 Median :4.000 Media
Mean :2.617 Mean :3.838 Mean :3.745 Mean :3.217 Mean :3.809 Mean
3rd Qu.:3.000 3rd Qu.:5.000 3rd Qu.:5.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Regular Sugar Fruit Process Quality T


Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000 Min.
1st Qu.:2.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:2.000 1st Qu.:3.000 1st Q
Median :3.000 Median :2.000 Median :1.000 Median :3.000 Median :4.000 Media
Mean :3.072 Mean :2.145 Mean :1.694 Mean :2.932 Mean :3.694 Mean
3rd Qu.:4.000 3rd Qu.:3.000 3rd Qu.:3.000 3rd Qu.:4.000 3rd Qu.:4.000 3rd Q
Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max. :5.000 Max.

Bartlett Test/KMO Test:

library(psych)

require(psych)

cereal_Matrix <- cor(cerealdata[,-1])

cereal_Matrix <- round(cereal_Matrix, 2)

cerealKMO <- KMO(cerealdata[,-1])

cerealKMO

cereal_Bartlett <- cortest.bartlett(cereal_Matrix, n = nrow(cerealdata))

cereal_Bartlett

Kaiser-Meyer-Olkin factor ade


Call: KMO(r = cerealdata[, -
Overall MSA = 0.85
MSA for each item =
Filling Natural Fibre Sweet Easy Salt Satisfying En
0.89 0.90 0.88 0.78 0.83 0.82 0.91
Family Calories Plain Crisp Regular Sugar Fruit
0.73 0.86 0.82 0.83 0.87 0.78 0.77

library(psych)

require(psych)

cereal_fa <- as.matrix(cerealdata[,2:26])

cor(cereal_fa)

Filling Natural Fibre Sweet Easy Salt


Filling 1.00000000 0.53968982 0.552003065 0.19040004 0.237430844 -0.03626646
Natural 0.53968982 1.00000000 0.652289828 -0.09094192 0.231200127 -0.21687200
Fibre 0.55200307 0.65228983 1.000000000 -0.03739830 0.175859374 -0.17488799
Sweet 0.19040004 -0.09094192 -0.037398300 1.00000000 0.124736166 0.44399118
Easy 0.23743084 0.23120013 0.175859374 0.12473617 1.000000000 0.01371860
Salt -0.03626646 -0.21687200 -0.174887993 0.44399118 0.013718595 1.00000000 -
Satisfying 0.65415162 0.46649207 0.414854460 0.17953203 0.351409453 -0.01274599
Energy 0.63675882 0.49354159 0.503730689 0.18496133 0.181689577 -0.06713581
Fun 0.26521397 0.08190321 0.062730827 0.32722313 0.239504083 0.03347454
Kids 0.16032166 0.05971495 -0.093404569 0.11908175 0.242728223 0.02448380
Soggy 0.05988555 -0.06839973 0.041667404 0.08375192 0.007683385 -0.02359707
Economical 0.05194244 0.10316137 -0.033965332 -0.23981376 0.089328985 -0.12590486
Health 0.54706871 0.68809770 0.683983690 -0.11562213 0.204213278 -0.22837678
Family 0.23367398 0.10674234 -0.008412267 0.03853504 0.225122821 -0.08943424
Calories 0.04721422 -0.16167366 -0.186542023 0.46731243 -0.022805607 0.43809745
Plain -0.25064803 -0.13851302 -0.122845902 -0.28955897 0.019140316 0.02137203 -
Crisp 0.12687526 0.02080611 0.050527459 0.25981733 0.240631080 0.09550574
Regular 0.42049880 0.41763842 0.648375681 -0.02518025 0.106329931 -0.16453021
Sugar -0.07851945 -0.31680448 -0.225567250 0.64838267 -0.015639984 0.59177089 -
Fruit 0.26116604 0.30015027 0.293141065 0.34650542 0.035884483 0.02557426
Process -0.23419509 -0.30805266 -0.194892706 0.11450985 -0.066393291 0.29832766 -
Quality 0.44321697 0.57909956 0.513193764 -0.07754712 0.164648484 -0.21785225
Treat 0.33983991 0.16989309 0.142593245 0.37467405 0.184731541 0.12062176
Boring 0.17785084 0.21758679 0.099258673 0.20033406 0.169705127 -0.11223148
Nutritious 0.52621459 0.65072607 0.713064954 -0.04716005 0.204448721 -0.16009606
Economical Health Family Calories Plain Crisp
Filling 0.05194244 0.547068708 0.233673983 0.047214217 -0.25064803 0.12687526
Natural 0.10316137 0.688097695 0.106742337 -0.161673661 -0.13851302 0.02080611
Fibre -0.03396533 0.683983690 -0.008412267 -0.186542023 -0.12284590 0.05052746
Sweet -0.23981376 -0.115622126 0.038535041 0.467312428 -0.28955897 0.25981733
Easy 0.08932898 0.204213278 0.225122821 -0.022805607 0.01914032 0.24063108
Salt -0.12590486 -0.228376777 -0.089434239 0.438097454 0.02137203 0.09550574
Satisfying 0.21217530 0.522089653 0.345222020 0.005358204 -0.17995799 0.26408614
Energy 0.02641362 0.524243298 0.190902922 0.033625413 -0.25577344 0.24855721
Fun 0.04070048 0.100955593 0.347184634 0.113449859 -0.32227548 0.39869487
Kids 0.30393460 -0.013620606 0.724116120 0.009721636 0.03024138 0.29370997
Soggy -0.11715122 -0.006146656 -0.082666210 0.079664961 -0.34612983 0.33714118
Economical 1.00000000 0.192658638 0.231987240 -0.210471442 0.23120114 0.09084745
Health 0.19265864 1.000000000 0.081719400 -0.307176155 -0.09960932 0.08218529
Family 0.23198724 0.081719400 1.000000000 -0.066136936 -0.02820673 0.27907646
Calories -0.21047144 -0.307176155 -0.066136936 1.000000000 -0.07619086 0.14338946
Plain 0.23120114 -0.099609317 -0.028206729 -0.076190855 1.00000000 -0.21020347
Crisp 0.09084745 0.082185293 0.279076456 0.143389460 -0.21020347 1.00000000
Regular 0.08029354 0.543222577 0.044234462 -0.164908655 -0.08026008 0.13442586
Sugar -0.29255416 -0.376892968 -0.061661312 0.525826174 -0.14685692 0.16376620
Fruit -0.33848391 0.266341061 -0.125689029 0.125937859 -0.34308629 0.08983357
Process -0.12910943 -0.292763907 -0.027407092 0.271275078 0.11507418 0.01001031
Quality 0.21549364 0.686304848 0.236893992 -0.201350145 -0.22690816 0.13014529
Treat -0.04241349 0.215207088 0.290905323 0.189949931 -0.43243767 0.46023136
Boring 0.02137835 0.228589063 0.249748195 0.027015687 -0.33052554 0.32640996
Nutritious 0.12902808 0.757614796 0.091035941 -0.226340067 -0.14491592 0.10308733
Treat Boring Nutritious
Filling 0.33983991 0.177850835 0.52621459
Natural 0.16989309 0.217586787 0.65072607
Fibre 0.14259324 0.099258673 0.71306495
Sweet 0.37467405 0.200334059 -0.04716005
Easy 0.18473154 0.169705127 0.20444872
Salt 0.12062176 -0.112231476 -0.16009606
Satisfying 0.37035324 0.319654672 0.50168016
Energy 0.32363505 0.223388817 0.53577674
Fun 0.58464814 0.298063613 0.15523030
Kids 0.27591464 0.195340193 0.03324750
Soggy 0.25608689 0.226885825 -0.03278639
Economical -0.04241349 0.021378353 0.12902808
Health 0.21520709 0.228589063 0.75761480
Family 0.29090532 0.249748195 0.09103594
Calories 0.18994993 0.027015687 -0.22634007
Plain -0.43243767 -0.330525544 -0.14491592
Crisp 0.46023136 0.326409963 0.10308733
Regular 0.16807989 0.094697872 0.56777612
Sugar 0.21271505 0.000921067 -0.27463739
Fruit 0.31404638 0.260061699 0.30605745
Process 0.01515335 -0.172489361 -0.28600488
Quality 0.33178455 0.284256014 0.65983453
Treat 1.00000000 0.362789133 0.24507215
Boring 0.36278913 1.000000000 0.17027548
Nutritious 0.24507215 0.170275481 1.00000000

library(corrplot)

require(corrplot)

corrplot(cor(cereal_fa), model = "circle", order="hclust")


cerealfactors <- fa.parallel(cerealdata[,-1],fm="ml",fa="fa")
Parallel analysis suggests that the number of factors = 4 and the number of components = NA

A Scree Plot is a simple line segment plot that shows the fraction of total variance in the data as
explained or represented by each PC.

library(car)

require(car)

fa_model1<-factanal(cerealdata [,-1],4, rotation="none",na.action = na.omit)

fa_model1$loadings

Loadings:
Factor1 Factor2 Factor3 Factor4
Filling 0.697 0.218 0.121
Natural 0.765 -0.127
Fibre 0.759 -0.156 0.254 0.149
Sweet 0.718 0.351
Easy 0.290 0.209 -0.139
Salt -0.260 0.452 0.274 0.376
Satisfying 0.679 0.303
Energy 0.673 0.221 0.100
Fun 0.289 0.562 -0.100 -0.248
Kids 0.165 0.473 -0.710 0.125
Soggy 0.161 0.181 -0.409
Economical 0.181 -0.112 -0.464 0.124
Health 0.855 -0.191
Family 0.261 0.404 -0.648
Calories -0.242 0.498 0.281 0.153
Plain -0.232 -0.332 -0.253 0.469
Crisp 0.202 0.476 -0.210
Regular 0.609 0.177
Sugar -0.349 0.642 0.403 0.205
Fruit 0.328 0.201 0.491 -0.215
Process -0.333 0.211 0.213
Quality 0.748
Treat 0.370 0.598 -0.293
Boring 0.320 0.308 -0.361
Nutritious 0.834 0.121 0.105

Factor1 Factor2 Factor3 Factor4


SS loadings 6.016 3.318 2.112 1.132
Proportion Var 0.241 0.133 0.084 0.045
Cumulative Var 0.241 0.373 0.458 0.503

print(fa_model1$loadings, digits = 3, cutoff = 0.6, sort = TRUE)

Loadings:
Factor1 Factor2 Factor3 Factor4
Filling 0.697
Natural 0.765
Fibre 0.759
Satisfying 0.679
Energy 0.673
Health 0.855
Regular 0.609
Quality 0.748
Nutritious 0.834
Sweet 0.718
Fun
Sugar 0.642
Treat
Kids -0.710
Family -0.648
Easy
Salt
Soggy
Economical
Calories
Plain
Crisp
Fruit
Process
Boring

Factor1 Factor2 Factor3 Factor4


SS loadings 6.016 3.318 2.112 1.132
Proportion Var 0.241 0.133 0.084 0.045
Cumulative Var 0.241 0.373 0.458 0.503

Factor Analysis using Factional without rotation:

fa_promax<-factanal(cerealdata[,-1],4, rotation="promax",na.action = na.omit)

load<-fa_promax$loadings[,1:2]

print(fa_promax$loadings, digits = 3, cutoff = 0.4, sort = TRUE)

Loadings:
Factor1 Factor2 Factor3 Factor4
Filling 0.692
Natural 0.779
Fibre 0.896
Satisfying 0.574
Energy 0.625
Health 0.859
Regular 0.674
Quality 0.614
Nutritious 0.874
Fun 0.542
Soggy 0.549
Plain -0.724
Treat 0.635
Boring 0.563
Sweet 0.695
Salt 0.732
Calories 0.601
Sugar 0.805
Kids 0.899
Family 0.796
Easy
Economical 0.417
Crisp 0.452
Fruit 0.428
Process

Factor1 Factor2 Factor3 Factor4


SS loadings 5.225 2.509 2.460 2.290
Proportion Var 0.209 0.100 0.098 0.092
Cumulative Var 0.209 0.309 0.408 0.499

Factor Analysis using Factional with rotation

Load

plot(load, type= "n")

text(load, labels=names(cerealdata), cex = 0.7)


library(GPArotation)

require(GPArotation)

modelGPArotation<-fa(cerealdata[,-1],nfactors = 4,fm="ml", rotate="oblimin")

modelGPArotation$loadings

Loadings:
ML1 ML2 ML3 ML4
Filling 0.701 0.173 0.135
Natural 0.763 -0.106
Fibre 0.856 -0.165
Sweet 0.714 0.221
Easy 0.248 0.270
Salt 0.732 -0.223
Satisfying 0.607 0.125 0.315
Energy 0.641 0.133 0.105 0.136
Fun 0.111 0.319 0.501
Kids 0.883
Soggy -0.151 -0.174 0.522
Economical 0.102 -0.242 0.408 -0.211
Health 0.839 -0.170
Family 0.788
Calories 0.609
Plain 0.151 -0.686
Crisp 0.273 0.417
Regular 0.654
Sugar -0.135 0.815
Fruit 0.306 0.179 -0.350 0.410
Process -0.179 0.368 -0.179
Quality 0.629 -0.178 0.106 0.148
Treat 0.130 0.162 0.209 0.590
Boring -0.119 0.145 0.533
Nutritious 0.854

ML1 ML2 ML3 ML4


SS loadings 5.115 2.531 2.242 2.214
Proportion Var 0.205 0.101 0.090 0.089
Cumulative Var 0.205 0.306 0.396 0.484

print(modelGPArotation$loadings, digits = 3, cutoff = 0.4, sort = TRUE)

Loadings:
ML1 ML2 ML3 ML4
Filling 0.701
Natural 0.763
Fibre 0.856
Satisfying 0.607
Energy 0.641
Health 0.839
Regular 0.654
Quality 0.629
Nutritious 0.854
Sweet 0.714
Salt 0.732
Calories 0.609
Sugar 0.815
Kids 0.883
Family 0.788
Fun 0.501
Soggy 0.522
Plain -0.686
Treat 0.590
Boring 0.533
Easy
Economical 0.408
Crisp 0.417
Fruit 0.410
Process

ML1 ML2 ML3 ML4


SS loadings 5.115 2.531 2.242 2.214
Proportion Var 0.205 0.101 0.090 0.089
Cumulative Var 0.205 0.306 0.396 0.484

load<-modelGPArotation$loadings[,1:2]

load

ML1 ML2
Filling 0.701309046 0.17322694
Natural 0.762630232 -0.10595635
Fibre 0.855949168 0.01858967
Sweet 0.067773891 0.71424553
Easy 0.247638121 0.08834512
Salt 0.018487003 0.73211631
Satisfying 0.607278616 0.12478236
Energy 0.641198914 0.13328900
Fun 0.042685902 0.11102035
Kids -0.037378842 0.02764293
Soggy -0.151059001 -0.09341945
Economical 0.102188330 -0.24153339
Health 0.838844472 -0.17020388
Family 0.016740114 -0.07086225
Calories -0.090872130 0.60912744
Plain 0.004911829 0.01336992
Crisp -0.005560806 0.09520097
Regular 0.653515781 0.02391396
Sugar -0.135032147 0.81512934
Fruit 0.306033868 0.17938139
Process -0.178563912 0.36792347
Quality 0.628917125 -0.17809305
Treat 0.130110153 0.16203962
Boring 0.042978937 -0.11926946
Nutritious 0.853919890 -0.05081306

Plot the loadings of Factor 1 & Factor 2

plot(load, type= "n")


text(load, labels=names(cerealdata), cex = 0.7)

Factor analysis with oblimin rotation given good output

Creating Factors

factor1 <- c(2,3,4,8,9,14,19,23,26)

factor2 <- c(5,7,16,20,22)

factor3 <- c(11,13,15)

factor4 <- c(12,17,18,24,25)

Grouping The Factors


Filling Natural Fibre Satisfying Energy Health Regular Quality Nutritious Majority of
these column names related to wellness they can be named as "Wellness"

colnames(cerealdata[,c(2,3,4,8,9,14,19,23,26)])
[1] "Filling" "Natural" "Fibre" "Satisfying" "Energy"
"Health" "Regular" "Quality" "Nutritious"

Sweet Salt Calories Sugar Process as majority of these column names related to Taste, it can be
named as "Taste"

colnames(cerealdata[,c(5,7,16,20,22)])
[1] "Sweet" "Salt" "Calories" "Sugar" "Process"

Kids Economical Family as majority of these column names related to family, it can be named as
"Family"

colnames(cerealdata[,c(11,13,15)])
[1] "Kids" "Economical" "Family"

Soggy Plain Crisp Treat Boring as majority of these column names related to feelings, it can be
named as "Feeling"

colnames(cerealdata[,c(12,17,18,24,25)])
[1] "Soggy" "Plain" "Crisp" "Treat" "Boring"

Creating avg. score for all 4 grouped factors

cerealdata$factor1score <-apply(cerealdata[,factor1],1,mean)

cerealdata$factor2score <-apply(cerealdata[,factor2],1,mean)

cerealdata$factor3score <-apply(cerealdata[,factor3],1,mean)

cerealdata$factor4score <-apply(cerealdata[,factor4],1,mean)

creating the new columns in the dataset and deducing the 12 brands aggregrate behavior for
interpretation

colnames(cerealdata)[27:30] <-c("Welness", "Taste", "Family", "Feeling")

agg.fa.cereal<-aggregate(cerealdata[,27:30], list(cerealdata[,1]), mean)

format(agg.fa.cereal, digits = 2)

Group.1 Welness Taste Family Feeling


1 AllBran 3.9 2.2 3.0 2.9
2 CMuesli 4.0 2.8 3.5 3.3
3 CornFlakes 3.3 2.7 4.1 3.3
4 JustRight 3.6 2.7 3.2 3.2
5 Komplete 4.0 2.6 2.6 3.2
6 NutriGrain 3.4 3.1 4.0 3.5
7 PMuesli 4.1 2.9 3.2 3.5
8 RiceBubbles 2.9 2.2 4.2 3.3
9 SpecialK 3.5 2.3 3.7 3.4
10 Sustain 4.2 2.2 3.3 3.4
11 Vitabrit 3.9 1.9 3.9 2.9
12 Weetabix 3.9 2.1 3.8 2.7

You might also like