dr.sc. Luka Šikić
22 ožujak, 2020
Dimenzije mjerenja anksioznosti vezane uz učenje statistike.
Korelacija između dimenzija anksioznosti.
Struktura varijance kod FA.
Razlika između PCA i FA.
Struktura varijance kod PCA.
Opterećenja po komponentama na osnovi PCA.
Opterećenja po komponentama na osnovi PCA.
Scree grafikon na osnovi PCA.
Zajednička varijanca (communalities) kod PCA.
Zajednička varijanca (communalities) kod SFA pristupa.
Ukupna varijanca kod SFA pristupa.
Varijanca po faktorima kod SFA pristupa.
Rotacija:
Cilj rotacije je postići jednostavnu strukturu(simple structure) kod faktorskih opterećenja:
Primjer jednostavne strukture.
Opterećenja kod Varimax rotacije.
Opterećenja kod Varimax rotacije sa Keiser korekcijom.
Transformacijska matrica.
Grafički prikaz rotacije.
Ukupna objašnjena varijanca.
Ukupna objašnjene varijance kod različitih rotacija.
Matrica faktorskih obrazaca.
Strukturna matrica.
Strukturna matrica.
Grafički prikaz zaobljene rotacije.
Grafički prikaz zaobljene rotacije u faktorskom prostoru.
Ukupna objašnjena varijanca.
Interpretacija rezultata.
Pitanja za provedbu istraživanja o anksioznosti studenata oko pisanja ispita.
Korelacija izmedju pitanja.
Varijanca za PCA komponente.
Opterećenja za dva najvažnija faktora(ne-rotirano i OBLIMIN rotirano).
Vizualizacija faktorskih opterećenja.
Varijable u istraživanju psihomotornih sposobnosti pilota.
Korelacija izmedju varijabli.
Scree grafikon za komponente.
Zajednički dio varijance/comunalities.
Zajednički dio varijance/comunalities.
library(psych)
library(GPArotation)
## UČITAJ I UREDI PODATKE ##
bfi_dta <- bfi # Učitaj podatke
head(bfi_dta, 10) # Pogledaj podatke## A1 A2 A3 A4 A5 C1 C2 C3 C4 C5 E1 E2 E3 E4 E5 N1 N2 N3 N4 N5 O1 O2 O3 O4
## 61617 2 4 3 4 4 2 3 3 4 4 3 3 3 4 4 3 4 2 2 3 3 6 3 4
## 61618 2 4 5 2 5 5 4 4 3 4 1 1 6 4 3 3 3 3 5 5 4 2 4 3
## 61620 5 4 5 4 4 4 5 4 2 5 2 4 4 4 5 4 5 4 2 3 4 2 5 5
## 61621 4 4 6 5 5 4 4 3 5 5 5 3 4 4 4 2 5 2 4 1 3 3 4 3
## 61622 2 3 3 4 5 4 4 5 3 2 2 2 5 4 5 2 3 4 4 3 3 3 4 3
## 61623 6 6 5 6 5 6 6 6 1 3 2 1 6 5 6 3 5 2 2 3 4 3 5 6
## 61624 2 5 5 3 5 5 4 4 2 3 4 3 4 5 5 1 2 2 1 1 5 2 5 6
## 61629 4 3 1 5 1 3 2 4 2 4 3 6 4 2 1 6 3 2 6 4 3 2 4 5
## 61630 4 3 6 3 3 6 6 3 4 5 5 3 NA 4 3 5 5 2 3 3 6 6 6 6
## 61633 2 5 6 6 5 6 5 6 2 1 2 2 4 5 5 5 5 5 2 4 5 1 5 5
## O5 gender education age
## 61617 3 1 NA 16
## 61618 3 2 NA 18
## 61620 2 2 NA 17
## 61621 5 2 NA 17
## 61622 3 1 NA 17
## 61623 1 2 3 21
## 61624 1 1 NA 18
## 61629 3 1 2 19
## 61630 1 1 1 19
## 61633 2 2 NA 17
## A1 A2 A3 A4 A5
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.0 Min. :1.00
## 1st Qu.:1.000 1st Qu.:4.000 1st Qu.:4.000 1st Qu.:4.0 1st Qu.:4.00
## Median :2.000 Median :5.000 Median :5.000 Median :5.0 Median :5.00
## Mean :2.413 Mean :4.802 Mean :4.604 Mean :4.7 Mean :4.56
## 3rd Qu.:3.000 3rd Qu.:6.000 3rd Qu.:6.000 3rd Qu.:6.0 3rd Qu.:5.00
## Max. :6.000 Max. :6.000 Max. :6.000 Max. :6.0 Max. :6.00
## NA's :16 NA's :27 NA's :26 NA's :19 NA's :16
## C1 C2 C3 C4 C5
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:4.000 1st Qu.:4.00 1st Qu.:4.000 1st Qu.:1.000 1st Qu.:2.000
## Median :5.000 Median :5.00 Median :5.000 Median :2.000 Median :3.000
## Mean :4.502 Mean :4.37 Mean :4.304 Mean :2.553 Mean :3.297
## 3rd Qu.:5.000 3rd Qu.:5.00 3rd Qu.:5.000 3rd Qu.:4.000 3rd Qu.:5.000
## Max. :6.000 Max. :6.00 Max. :6.000 Max. :6.000 Max. :6.000
## NA's :21 NA's :24 NA's :20 NA's :26 NA's :16
## E1 E2 E3 E4
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:2.000 1st Qu.:2.000 1st Qu.:3.000 1st Qu.:4.000
## Median :3.000 Median :3.000 Median :4.000 Median :5.000
## Mean :2.974 Mean :3.142 Mean :4.001 Mean :4.422
## 3rd Qu.:4.000 3rd Qu.:4.000 3rd Qu.:5.000 3rd Qu.:6.000
## Max. :6.000 Max. :6.000 Max. :6.000 Max. :6.000
## NA's :23 NA's :16 NA's :25 NA's :9
## E5 N1 N2 N3
## Min. :1.000 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:4.000 1st Qu.:2.000 1st Qu.:2.000 1st Qu.:2.000
## Median :5.000 Median :3.000 Median :4.000 Median :3.000
## Mean :4.416 Mean :2.929 Mean :3.508 Mean :3.217
## 3rd Qu.:5.000 3rd Qu.:4.000 3rd Qu.:5.000 3rd Qu.:4.000
## Max. :6.000 Max. :6.000 Max. :6.000 Max. :6.000
## NA's :21 NA's :22 NA's :21 NA's :11
## N4 N5 O1 O2 O3
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.000 Min. :1.000
## 1st Qu.:2.000 1st Qu.:2.00 1st Qu.:4.000 1st Qu.:1.000 1st Qu.:4.000
## Median :3.000 Median :3.00 Median :5.000 Median :2.000 Median :5.000
## Mean :3.186 Mean :2.97 Mean :4.816 Mean :2.713 Mean :4.438
## 3rd Qu.:4.000 3rd Qu.:4.00 3rd Qu.:6.000 3rd Qu.:4.000 3rd Qu.:5.000
## Max. :6.000 Max. :6.00 Max. :6.000 Max. :6.000 Max. :6.000
## NA's :36 NA's :29 NA's :22 NA's :28
## O4 O5 gender education age
## Min. :1.000 Min. :1.00 Min. :1.000 Min. :1.00 Min. : 3.00
## 1st Qu.:4.000 1st Qu.:1.00 1st Qu.:1.000 1st Qu.:3.00 1st Qu.:20.00
## Median :5.000 Median :2.00 Median :2.000 Median :3.00 Median :26.00
## Mean :4.892 Mean :2.49 Mean :1.672 Mean :3.19 Mean :28.78
## 3rd Qu.:6.000 3rd Qu.:3.00 3rd Qu.:2.000 3rd Qu.:4.00 3rd Qu.:35.00
## Max. :6.000 Max. :6.00 Max. :2.000 Max. :5.00 Max. :86.00
## NA's :14 NA's :20 NA's :223
## [1] 731
## [1] 0
## PROVEDI ANALIZU ##
cor_bfd <- cor(clean_bfd) # Napravi korelacijsku tablicu
fa_bfd <- fa(cor_bfd, nfactors = 6) # Provedi FA
summary(fa_bfd)##
## Factor analysis with Call: fa(r = cor_bfd, nfactors = 6)
##
## Test of the hypothesis that 6 factors are sufficient.
## The degrees of freedom for the model is 225 and the objective function was 0.57
##
## The root mean square of the residuals (RMSA) is 0.02
## The df corrected root mean square of the residuals is 0.03
##
## With factor correlations of
## MR2 MR3 MR1 MR5 MR4 MR6
## MR2 1.00 -0.18 0.24 -0.05 -0.01 0.10
## MR3 -0.18 1.00 -0.23 0.16 0.19 0.04
## MR1 0.24 -0.23 1.00 -0.28 -0.19 -0.15
## MR5 -0.05 0.16 -0.28 1.00 0.18 0.17
## MR4 -0.01 0.19 -0.19 0.18 1.00 0.05
## MR6 0.10 0.04 -0.15 0.17 0.05 1.00
library(FactoMineR)
library(factoextra)
## UČITAJ I PREGLEDAJ PODATKE ##
data(wine)
df <- wine[,c(1,2,16,22,29,28,30,31)]
head(df[, 1:7], 10)## Label Soil Plante Acidity Harmony Intensity Overall.quality
## 2EL Saumur Env1 2.000 2.107 3.143 2.857 3.393
## 1CHA Saumur Env1 2.000 2.107 2.964 2.893 3.214
## 1FON Bourgueuil Env1 1.750 2.179 3.143 3.074 3.536
## 1VAU Chinon Env2 2.304 3.179 2.038 2.462 2.464
## 1DAM Saumur Reference 1.762 2.571 3.643 3.643 3.741
## 2BOU Bourgueuil Reference 1.750 2.393 3.500 3.464 3.643
## 1BOI Bourgueuil Reference 1.826 2.607 3.556 3.643 3.714
## 3EL Saumur Env1 2.080 2.179 3.296 3.321 3.393
## DOM1 Chinon Env1 1.875 2.286 3.286 3.148 3.200
## 1TUR Saumur Env2 2.000 2.357 2.963 2.857 3.179
## 'data.frame': 21 obs. of 8 variables:
## $ Label : Factor w/ 3 levels "Saumur","Bourgueuil",..: 1 1 2 3 1 2 2 1 3 1 ...
## $ Soil : Factor w/ 4 levels "Reference","Env1",..: 2 2 2 3 1 1 1 2 2 3 ...
## $ Plante : num 2 2 1.75 2.3 1.76 ...
## $ Acidity : num 2.11 2.11 2.18 3.18 2.57 ...
## $ Harmony : num 3.14 2.96 3.14 2.04 3.64 ...
## $ Intensity : num 2.86 2.89 3.07 2.46 3.64 ...
## $ Overall.quality: num 3.39 3.21 3.54 2.46 3.74 ...
## $ Typical : num 3.25 3.04 3.18 2.25 3.44 ...
## *The results are available in the following objects:
##
## name description
## 1 "$eig" "eigenvalues and inertia"
## 2 "$var" "Results for the variables"
## 3 "$ind" "results for the individuals"
## 4 "$quali.var" "Results for the qualitative variables"
## 5 "$quanti.var" "Results for the quantitative variables"
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 4.8315174 43.922886 43.92289
## Dim.2 1.8568797 16.880724 60.80361
## Dim.3 1.5824794 14.386176 75.18979
## Dim.4 1.1491200 10.446546 85.63633
## Dim.5 0.6518053 5.925503 91.56183
## FAMD results for variables
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante 0.7344160 0.060551966 0.105902048 0.004011299 0.0010340559
## Acidity 0.1732738 0.491118153 0.126394029 0.115376784 0.0045862935
## Harmony 0.8943968 0.023628146 0.040124469 0.003653813 0.0086624633
## Intensity 0.6991811 0.134639254 0.065382234 0.023214984 0.0064730431
## Overall.quality 0.9115699 0.005246728 0.009336677 0.005445276 0.0007961880
## Typical 0.7808611 0.027094327 0.001549791 0.083446627 0.0005912942
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante 0.53936692 3.666541e-03 1.121524e-02 1.609052e-05 1.069272e-06
## Acidity 0.03002381 2.411970e-01 1.597545e-02 1.331180e-02 2.103409e-05
## Harmony 0.79994566 5.582893e-04 1.609973e-03 1.335035e-05 7.503827e-05
## Intensity 0.48885427 1.812773e-02 4.274836e-03 5.389355e-04 4.190029e-05
## Overall.quality 0.83095973 2.752815e-05 8.717353e-05 2.965103e-05 6.339153e-07
## Typical 0.60974400 7.341026e-04 2.401853e-06 6.963340e-03 3.496288e-07
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante 15.200526 3.2609526 6.69215972 0.3490757 0.15864490
## Acidity 3.586323 26.4485720 7.98708850 10.0404466 0.70362936
## Harmony 18.511716 1.2724651 2.53554453 0.3179662 1.32899551
## Intensity 14.471254 7.2508336 4.13163258 2.0202401 0.99309457
## Overall.quality 18.867156 0.2825562 0.59000304 0.4738648 0.12215119
## Typical 16.161818 1.4591321 0.09793437 7.2617850 0.09071638
## ANALIZA KVANTITATIVNIH VARIJABLI ##
quant_variables <- get_famd_var(FA_df, "quanti.var")
quant_variables## FAMD results for quantitative variables
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante -0.8569808 0.2460731 0.32542595 -0.06333481 0.03215674
## Acidity -0.4162617 0.7007982 -0.35551938 0.33967158 -0.06772218
## Harmony 0.9457255 0.1537145 0.20031093 -0.06044678 0.09307236
## Intensity 0.8361705 0.3669322 0.25569950 0.15236464 0.08045522
## Overall.quality 0.9547617 0.0724343 -0.09662648 -0.07379211 -0.02821680
## Typical 0.8836634 0.1646035 -0.03936739 -0.28887130 0.02431654
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante 0.7344160 0.060551966 0.105902048 0.004011299 0.0010340559
## Acidity 0.1732738 0.491118153 0.126394029 0.115376784 0.0045862935
## Harmony 0.8943968 0.023628146 0.040124469 0.003653813 0.0086624633
## Intensity 0.6991811 0.134639254 0.065382234 0.023214984 0.0064730431
## Overall.quality 0.9115699 0.005246728 0.009336677 0.005445276 0.0007961880
## Typical 0.7808611 0.027094327 0.001549791 0.083446627 0.0005912942
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Plante 15.200526 3.2609526 6.69215972 0.3490757 0.15864490
## Acidity 3.586323 26.4485720 7.98708850 10.0404466 0.70362936
## Harmony 18.511716 1.2724651 2.53554453 0.3179662 1.32899551
## Intensity 14.471254 7.2508336 4.13163258 2.0202401 0.99309457
## Overall.quality 18.867156 0.2825562 0.59000304 0.4738648 0.12215119
## Typical 16.161818 1.4591321 0.09793437 7.2617850 0.09071638
## ANALIZA KVALITATIVNIH VARIJABLI ##
quali_variables <- get_famd_var(FA_df, "quali.var")
quali_variables## FAMD results for qualitative variable categories
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Saumur 0.08238236 0.2041021 0.9985884 -0.3996689 -0.1453137
## Bourgueuil 0.72578122 -1.0944657 -0.8193199 1.0187071 -0.4092349
## Chinon -1.31522332 1.0804177 -1.5171382 -0.4289712 1.0134650
## Reference 2.06918009 0.6112128 -0.2525731 0.6853384 0.0157536
## Env1 -0.30736790 -1.6929988 -0.1158917 -0.3395732 0.3152922
## Env2 -1.40724432 1.2078471 -0.5667802 -1.0387469 -0.6525117
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Saumur 0.005417832 0.03325463 0.796031214 0.12751397 1.685660e-02
## Bourgueuil 0.144311261 0.32816561 0.183905958 0.28430691 4.588114e-02
## Chinon 0.269097795 0.18159107 0.358064613 0.02862644 1.597823e-01
## Reference 0.799196698 0.06973357 0.011907792 0.08767328 4.632514e-05
## Env1 0.029258912 0.88767590 0.004159544 0.03571150 3.078702e-02
## Env2 0.371052065 0.27335044 0.060190111 0.20216934 7.977604e-02
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## Saumur 0.01522912 0.6328503 20.8578860 6.336410 2.60345729
## Bourgueuil 0.64472767 9.9258736 7.6588378 22.454315 11.26267552
## Chinon 1.41147307 6.4484676 17.5071254 2.654399 46.04923094
## Reference 6.11375771 3.6115700 0.8491350 11.856544 0.01947164
## Env1 0.13490519 27.7092332 0.1787751 2.910817 7.79954850
## Env2 2.01986625 10.0741200 3.0542451 19.455364 23.86115933
## FAMD results for individuals
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## 2EL -0.1213241 -1.5797151 0.7615777 -1.1978981 0.28209940
## 1CHA -0.6536760 -1.6846472 0.7643619 -0.9923990 0.24345633
## 1FON 0.8701622 -2.2457285 -0.7788402 0.3339757 -0.16854021
## 1VAU -5.6883455 2.1640314 -2.2984115 0.2968312 -0.13215744
## 1DAM 2.4441041 1.2242463 0.2751576 0.4694187 -0.06885226
## 2BOU 2.2703576 -0.0768261 -0.8093529 1.4650543 -0.49582803
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## 2EL 0.002868247 0.4862727662 0.11301885 0.279616085 0.0155069631
## 1CHA 0.079955815 0.5310591076 0.10932589 0.184288214 0.0110909081
## 1FON 0.102535586 0.6829496072 0.08214305 0.015104410 0.0038466371
## 1VAU 0.747872962 0.1082388092 0.12209882 0.002036456 0.0004036818
## 1DAM 0.629756926 0.1580051034 0.00798172 0.023230275 0.0004997697
## 2BOU 0.612506755 0.0007013583 0.07783918 0.255052598 0.0292135595
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## 2EL 0.01450746 6.39962409 1.7453040 5.9464124 0.58138944
## 1CHA 0.42113589 7.27804699 1.7580884 4.0812003 0.43301702
## 1FON 0.74627279 12.93336227 1.8253213 0.4622159 0.20752473
## 1VAU 31.89106950 12.00947579 15.8963787 0.3651190 0.12759864
## 1DAM 5.88757653 3.84356758 0.2278272 0.9131374 0.03463372
## 2BOU 5.08025725 0.01513612 1.9711449 8.8945243 1.79607702
fviz_mfa_ind(FA_df,
habillage = "Label",
palette = c("#00AFBB", "#E7B800", "#FC4E07"),
addEllipses = TRUE, ellipse.type = "confidence",
repel = TRUE )## Label Soil Odor.Intensity.before.shaking
## 2EL Saumur Env1 3.074
## 1CHA Saumur Env1 2.964
## 1FON Bourgueuil Env1 2.857
## 1VAU Chinon Env2 2.808
## 1DAM Saumur Reference 3.607
## 2BOU Bourgueuil Reference 2.857
## 1BOI Bourgueuil Reference 3.214
## 3EL Saumur Env1 3.120
## DOM1 Chinon Env1 2.857
## 1TUR Saumur Env2 2.893
## 4EL Saumur Env2 3.250
## PER1 Saumur Env2 3.393
## Aroma.quality.before.shaking Fruity.before.shaking Flower.before.shaking
## 2EL 3.000 2.714 2.280
## 1CHA 2.821 2.375 2.280
## 1FON 2.929 2.560 1.960
## 1VAU 2.593 2.417 1.913
## 1DAM 3.429 3.154 2.154
## 2BOU 3.111 2.577 2.040
## 1BOI 3.222 2.962 2.115
## 3EL 2.852 2.500 2.200
## DOM1 2.815 2.808 1.923
## 1TUR 3.000 2.571 1.846
## 4EL 3.286 2.714 1.926
## PER1 3.179 2.769 2.038
## Spice.before.shaking Visual.intensity Nuance Surface.feeling
## 2EL 1.960 4.321 4.000 3.269
## 1CHA 1.680 3.222 3.000 2.808
## 1FON 2.077 3.536 3.393 3.000
## 1VAU 2.160 2.893 2.786 2.538
## 1DAM 2.040 4.393 4.036 3.385
## 2BOU 2.077 4.464 4.259 3.407
## 1BOI 2.040 4.143 3.929 3.250
## 3EL 2.185 4.214 3.857 3.077
## DOM1 2.074 4.037 3.893 3.280
## 1TUR 1.680 3.704 3.407 3.111
## 4EL 1.962 3.857 3.643 3.259
## PER1 1.920 4.714 4.500 3.321
## Odor.Intensity Quality.of.odour Fruity Flower Spice Plante Phenolic
## 2EL 3.407 3.308 2.885 2.320 1.840 2.000 1.650
## 1CHA 3.370 3.000 2.560 2.440 1.739 2.000 1.381
## 1FON 3.250 2.929 2.769 2.192 2.250 1.750 1.250
## 1VAU 3.160 2.880 2.391 2.083 2.167 2.304 1.476
## 1DAM 3.536 3.360 3.160 2.231 2.148 1.762 1.600
## 2BOU 3.179 3.385 2.800 2.240 2.148 1.750 1.476
## 1BOI 3.429 3.500 3.038 2.200 2.385 1.826 1.476
## 3EL 3.654 3.077 2.520 2.320 2.444 2.080 1.905
## DOM1 3.357 3.346 3.000 2.040 2.125 1.875 1.524
## 1TUR 3.222 3.259 2.926 2.040 2.042 2.000 1.773
## 4EL 3.607 3.385 2.889 2.115 2.160 1.955 1.571
## PER1 3.481 3.385 2.962 2.000 2.200 2.042 1.545
## Aroma.intensity Aroma.persistency Aroma.quality Attack.intensity Acidity
## 2EL 3.259 2.963 3.200 2.963 2.107
## 1CHA 2.962 2.808 2.926 3.036 2.107
## 1FON 3.077 2.800 3.077 3.222 2.179
## 1VAU 2.542 2.583 2.478 2.704 3.179
## 1DAM 3.615 3.296 3.462 3.464 2.571
## 2BOU 3.214 3.148 3.321 3.286 2.393
## 1BOI 3.250 3.222 3.385 3.393 2.607
## 3EL 3.280 3.160 2.962 3.250 2.179
## DOM1 3.148 2.893 3.308 3.286 2.286
## 1TUR 3.077 2.704 2.778 2.893 2.357
## 4EL 3.286 3.036 3.222 3.321 2.429
## PER1 3.321 3.071 3.143 3.357 2.429
## Astringency Alcohol Balance Smooth Bitterness Intensity Harmony
## 2EL 2.429 2.500 3.250 2.731 1.926 2.857 3.143
## 1CHA 2.179 2.654 2.926 2.500 1.926 2.893 2.964
## 1FON 2.250 2.643 3.321 2.679 2.000 3.074 3.143
## 1VAU 2.185 2.500 2.333 1.680 1.963 2.462 2.038
## 1DAM 2.536 2.786 3.464 3.036 2.071 3.643 3.643
## 2BOU 2.643 2.857 3.286 2.857 2.179 3.464 3.500
## 1BOI 2.607 2.778 3.464 2.857 1.929 3.643 3.556
## 3EL 2.630 2.778 3.179 2.786 2.000 3.321 3.296
## DOM1 2.407 2.741 3.143 2.821 1.964 3.148 3.286
## 1TUR 2.250 2.704 3.214 2.500 2.185 2.857 2.963
## 4EL 2.571 2.893 3.192 2.857 2.214 3.357 3.071
## PER1 2.607 2.821 3.107 2.889 2.037 3.250 3.393
## Overall.quality Typical
## 2EL 3.393 3.250
## 1CHA 3.214 3.036
## 1FON 3.536 3.179
## 1VAU 2.464 2.250
## 1DAM 3.741 3.444
## 2BOU 3.643 3.393
## 1BOI 3.714 3.357
## 3EL 3.393 3.071
## DOM1 3.200 3.500
## 1TUR 3.179 2.964
## 4EL 3.571 3.500
## PER1 3.148 3.556
## [1] "Label" "Soil"
## [3] "Odor.Intensity.before.shaking" "Aroma.quality.before.shaking"
## [5] "Fruity.before.shaking" "Flower.before.shaking"
## [7] "Spice.before.shaking" "Visual.intensity"
## [9] "Nuance" "Surface.feeling"
## [11] "Odor.Intensity" "Quality.of.odour"
## [13] "Fruity" "Flower"
## [15] "Spice" "Plante"
## [17] "Phenolic" "Aroma.intensity"
## [19] "Aroma.persistency" "Aroma.quality"
## [21] "Attack.intensity" "Acidity"
## [23] "Astringency" "Alcohol"
## [25] "Balance" "Smooth"
## [27] "Bitterness" "Intensity"
## [29] "Harmony" "Overall.quality"
## [31] "Typical"
## PROCIJENI MODEL ##
FA2_df <- MFA(wine,
group = c(2, 5, 3, 10, 9, 2),
type = c("n", "s", "s", "s", "s", "s"),
name.group = c("origin","odor","visual",
"odor.after.shaking",
"taste","overall"),
num.group.sup = c(1, 6),
graph = FALSE)
print(FA2_df)## **Results of the Multiple Factor Analysis (MFA)**
## The analysis was performed on 21 individuals, described by 31 variables
## *Results are available in the following objects :
##
## name description
## 1 "$eig" "eigenvalues"
## 2 "$separate.analyses" "separate analyses for each group of variables"
## 3 "$group" "results for all the groups"
## 4 "$partial.axes" "results for the partial axes"
## 5 "$inertia.ratio" "inertia ratio"
## 6 "$ind" "results for the individuals"
## 7 "$quanti.var" "results for the quantitative variables"
## 8 "$quanti.var.sup" "results for the quantitative supplementary variables"
## 9 "$quali.var.sup" "results for the categorical supplementary variables"
## 10 "$summary.quanti" "summary for the quantitative variables"
## 11 "$summary.quali" "summary for the categorical variables"
## 12 "$global.pca" "results for the global PCA"
## eigenvalue variance.percent cumulative.variance.percent
## Dim.1 3.4619504 49.378382 49.37838
## Dim.2 1.3667683 19.494446 68.87283
## Dim.3 0.6154291 8.777969 77.65080
## Dim.4 0.3721997 5.308747 82.95954
## Dim.5 0.2703825 3.856511 86.81605
## Dim.6 0.2024033 2.886912 89.70297
## Dim.7 0.1757134 2.506230 92.20920
## Dim.8 0.1258987 1.795714 94.00491
## Dim.9 0.1052755 1.501563 95.50647
## Dim.10 0.0787912 1.123812 96.63029
## Multiple Factor Analysis results for variable groups
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## 4 "$correlation" "Correlation between groups and principal dimensions"
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## odor 0.7820738 0.61977283 0.37353451 0.17260092 0.08553276
## visual 0.8546846 0.04014481 0.01438360 0.04550736 0.02966750
## odor.after.shaking 0.9247734 0.46892047 0.18009116 0.10139051 0.11589439
## taste 0.9004187 0.23793016 0.04741982 0.05270088 0.03928784
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## odor 0.3799491 0.238613517 0.0866745169 0.018506155 0.0045445922
## visual 0.7284016 0.001607007 0.0002062976 0.002065011 0.0008776492
## odor.after.shaking 0.6245535 0.160582210 0.0236855692 0.007507471 0.0098089810
## taste 0.7222292 0.050429542 0.0020031144 0.002474125 0.0013749986
## Dim.1 Dim.2 Dim.3 Dim.4 Dim.5
## odor 22.59055 45.345861 60.694972 46.37321 31.63399
## visual 24.68795 2.937207 2.337166 12.22660 10.97242
## odor.after.shaking 26.71250 34.308703 29.262699 27.24089 42.86313
## taste 26.00900 17.408230 7.705163 14.15930 14.53047
## Multiple Factor Analysis results for quantitative variables
## ===================================================
## Name Description
## 1 "$coord" "Coordinates"
## 2 "$cos2" "Cos2, quality of representation"
## 3 "$contrib" "Contributions"
## Dim.1 Dim.2 Dim.3 Dim.4
## Odor.Intensity.before.shaking 0.5908036 0.66723783 -0.02326175 0.3287015
## Aroma.quality.before.shaking 0.8352510 -0.07539908 -0.35417877 0.1414425
## Fruity.before.shaking 0.7160259 -0.15069626 -0.53748761 0.2517063
## Flower.before.shaking 0.4387181 -0.40937751 0.63731284 0.4029075
## Spice.before.shaking 0.0380525 0.86501993 0.12795122 -0.1822298
## Visual.intensity 0.8811873 0.23833245 0.14099033 -0.2128871
## Dim.5
## Odor.Intensity.before.shaking 0.05786231
## Aroma.quality.before.shaking 0.04992114
## Fruity.before.shaking 0.18981578
## Flower.before.shaking 0.12200773
## Spice.before.shaking 0.36741971
## Visual.intensity -0.17676282
## Dim.1 Dim.2 Dim.3 Dim.4
## Odor.Intensity.before.shaking 0.349048863 0.445206325 0.000541109 0.10804466
## Aroma.quality.before.shaking 0.697644264 0.005685021 0.125442602 0.02000597
## Fruity.before.shaking 0.512693037 0.022709361 0.288892928 0.06335608
## Flower.before.shaking 0.192473567 0.167589944 0.406167661 0.16233443
## Spice.before.shaking 0.001447992 0.748259477 0.016371514 0.03320769
## Visual.intensity 0.776491025 0.056802358 0.019878273 0.04532093
## Dim.5
## Odor.Intensity.before.shaking 0.003348047
## Aroma.quality.before.shaking 0.002492121
## Fruity.before.shaking 0.036030029
## Flower.before.shaking 0.014885886
## Spice.before.shaking 0.134997242
## Visual.intensity 0.031245096
## Dim.1 Dim.2 Dim.3 Dim.4
## Odor.Intensity.before.shaking 4.49733206 14.5296787 0.03921898 12.948424
## Aroma.quality.before.shaking 8.98882147 0.1855354 9.09194110 2.397581
## Fruity.before.shaking 6.60581103 0.7411389 20.93864000 7.592798
## Flower.before.shaking 2.47993227 5.4694372 29.43858302 19.454686
## Spice.before.shaking 0.01865671 24.4200703 1.18658923 3.979718
## Visual.intensity 7.91221841 1.4660681 1.13941864 4.295418
## Dim.5
## Odor.Intensity.before.shaking 0.5523351
## Aroma.quality.before.shaking 0.4111309
## Fruity.before.shaking 5.9439566
## Flower.before.shaking 2.4557588
## Spice.before.shaking 22.2708049
## Visual.intensity 4.0764862
## INDIVIDUALNI ELEMENTI ##
fviz_mfa_ind(FA2_df, col.ind = "cos2",
gradient.cols = c("#00AFBB", "#E7B800", "#FC4E07"),
repel = TRUE)fviz_mfa_ind(FA2_df,
habillage = "Label",
palette = c("#00AFBB", "#E7B800", "#FC4E07"),
addEllipses = TRUE, ellipse.type = "confidence",
repel = TRUE
)