02 Pca
02 Pca
Pen Sokny
2024-11-02
plot.PCA(data.pca,choix="ind",habillage="origin")
dimdesc(data.pca)
## $Dim.1
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## lactic flora 0.9027703 9.042095e-12
## total viable count 0.8608432 1.046240e-09
## lactobacilli 0.7850679 2.794787e-07
## enterobacteriaceae 0.7762683 4.620345e-07
## TMA 0.7642260 8.875014e-07
## TVBN 0.7421875 2.669421e-06
## brochothrix 0.7317450 4.332717e-06
## yeast 0.6773733 3.931341e-05
## salt -0.6282888 2.011051e-04
##
## Link between the variable and the categorical variable (1-way
anova)
## =============================================
## R2 p.value
## country 0.4700428 0.006510941
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_B 2.034676 0.02182296
## country=country_UK 1.371667 0.03851963
##
## $Dim.2
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## a* 0.8778082 1.890486e-10
## b* 0.8241727 2.177694e-08
## L* -0.7871225 2.476948e-07
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## origin=origin_N -0.891458 0.03418821
## country=country_DK -1.861880 0.02308395
##
## $Dim.3
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## water 0.7890429 2.210011e-07
## salt 0.3728937 4.240737e-02
## lipid -0.8780952 1.832645e-10
Nhận xét: - Trục 1 gỉải thích 34,18% sự biến thiên của dữ liệu - Trục 2 giải
thích 15,7% sự biến thiên của dữ liệu
PCA - Chem
pca.chem <- PCA(data, quali.sup=c(1:2), quanti.sup=c(10:18),graph=F)
barplot(pca.chem$eig[,2])
plot.PCA(pca.chem,choix="ind",habillage="origin")
dimdesc(pca.chem)
## $Dim.1
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## TMA 0.9578046 1.072504e-16
## TVBN 0.9197269 6.879550e-13
## total viable count 0.7195652 7.418192e-06
## lactic flora 0.6336632 1.704971e-04
## lactobacilli 0.4846553 6.643327e-03
## brochothrix 0.4781546 7.527008e-03
## enterobacteriaceae 0.4346824 1.637700e-02
## yeast 0.3696976 4.435172e-02
## salt -0.7323851 4.208666e-06
##
## Link between the variable and the categorical variable (1-way
anova)
## =============================================
## R2 p.value
## country 0.5745406 0.0006043146
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_B 2.318667 0.0005564809
## country=country_UK 1.092905 0.0376107608
##
## $Dim.2
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## water 0.8636571 8.004173e-10
## lipid -0.8973315 1.871617e-11
##
## $Dim.3
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## pH 0.984165 1.385763e-22
## enterobacteriaceae 0.387115 3.456551e-02
Nhận xét: Các điểm dữ liệu nằm rãi rác, trỗn lẫn vào nhau -> không thể phân
loại nếu xét hết các biến vào PCA -> chia các biến thành 3 nhóm (hoá học,
vật lí ) ### PCA - Micro
pca.micro <- PCA(data, quali.sup=c(1:2), quanti.sup=c(3:9,
16:18),graph=F)
barplot(pca.micro$eig[,2])
plot.PCA(pca.micro,choix="ind",habillage="origin")
dimdesc(pca.micro)
## $Dim.1
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## lactic flora 0.9221833 4.521678e-13
## lactobacilli 0.8341387 1.027065e-08
## enterobacteriaceae 0.8310142 1.306738e-08
## total viable count 0.8150255 4.170489e-08
## yeast 0.7575185 1.256023e-06
## brochothrix 0.7483912 1.980195e-06
## TMA 0.5932639 5.495767e-04
## TVBN 0.5773611 8.360344e-04
## salt -0.5270499 2.766896e-03
##
## $Dim.2
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## brochothrix 0.4374740 0.015624203
## lactobacilli -0.3891338 0.033554042
## yeast -0.5511110 0.001597768
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_UK 1.145814 0.007609671
##
## $Dim.3
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## brochothrix 0.4580063 0.01092346
## phenol 0.3675248 0.04571374
## total viable count -0.3973865 0.02966524
##
## Link between the variable and the categorical variable (1-way
anova)
## =============================================
## R2 p.value
## origin 0.2265879 0.03115647
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_I 1.3425501 0.025678628
## origin=origin_S 0.2913993 0.028215215
## origin=origin_N -0.4160643 0.008719431
PCA - Phys
pca.phys <- PCA(data, quali.sup=c(1:2), quanti.sup=c(3:15), graph=F)
barplot(pca.phys$eig[,2])
plot.PCA(pca.phys,choix="ind", habillage="origin")
dimdesc(pca.phys)
## $Dim.1
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## a* 0.9336250 5.241821e-14
## b* 0.8658556 6.465978e-10
## L* -0.7600854 1.101153e-06
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_DK -1.525172 0.03228349
##
## $Dim.2
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## L* 0.6406679 0.0001368427
## b* 0.4241641 0.0194890313
##
## Link between the variable and the categorical variable (1-way
anova)
## =============================================
## R2 p.value
## country 0.3722767 0.03717507
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## country=country_I -1.549898 0.009215841
##
## $Dim.3
##
## Link between the variable and the continuous variables (R-square)
##
======================================================================
===========
## correlation p.value
## brochothrix -0.4365214 0.015877769
## lactobacilli -0.4683110 0.009053576
##
## Link between the variable and the categorical variable (1-way
anova)
## =============================================
## R2 p.value
## country 0.4082417 0.02050408
## origin 0.2383054 0.02535371
##
## Link between variable and the categories of the categorical
variables
## ================================================================
## Estimate p.value
## origin=origin_N 0.2338344 0.01211358
## country=country_DK 0.5992204 0.04576309
## country=country_I -0.8225709 0.03094860
## origin=origin_S -0.2502612 0.01045153