Tải bản đầy đủ - 0 (trang)
3 Vẽ biểu đồ radar mô tả tính chất của các sản phẩm

3 Vẽ biểu đồ radar mô tả tính chất của các sản phẩm

Tải bản đầy đủ - 0trang

Phụ lục

3.1

> library(SensoMineR)

> data(chocolates)

> attach(hedochoc)

> n=t(hedochoc)

> hedo=c(n)

> group=gl(6,222,label=c("choc1","choc2","choc3","choc4","choc5","choc6"))

> group=as.factor(group)

> library(sciplot)

> bargraph.CI(group,hedo,ylab="Points",ylim=c(0,10),col="purple",main="Preference

mapping of Chocolates")

3.2

> n=t(hedochoc)

> mean=c(mean(n[,1]),mean(n[,2]),mean(n[,3]),mean(n[,4]),mean(n[,5]),mean(n[,6]))

> sp=gl(6,222)

> hedo=c(n)

> sp=as.factor(sp)

> data=data.frame(sp,hedo)

> analysis=lm(hedo~sp)

> anova(analysis)

Analysis of Variance Table

Response: hedo

Df Sum Sq Mean Sq F value Pr(>F)

sp



5 42.6 8.5171 1.5976 0.1577



Page

23



Residuals 1326 7069.2 5.3312

4.1

> library(SensoMineR)

> data(chocolates)

> attach(sensochoc)

# CocoaA

>t1=aov(CocoaA~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Prod

uct)

> summary(t1)



>t11=aov(Cocoa

A~Panelist+Product)

> summary(t11)



> TukeyHSD(t11)

# MilkA

>t2=aov(MilkA~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t2)



Page

24



> t21=aov(MilkA~Panelist+Product)

> summary(t21)



> TukeyHSD(t21)

# CocoaF

>t3=aov(CocoaF~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Prod

uct)

> summary(t3)



> t31=aov(CocoaF~Panelist+Product+Session+Panelist:Product)

> summary(t31)



# MilkF



Page

25



>t4=aov(MilkF~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produc

t)

> summary(t4)



> t41=aov(MilkF~Panelist+Session+Product+Panelist:Session+Panelist:Product)

> summary(t41)



# Caramel

>t5=aov(Caramel~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t5)



> t51=aov(Caramel~Panelist+Product+Panelist:Session+Panelist:Product)

> summary(t51)



Page

26



# Vanilla

>t6=aov(Vanilla~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t6)



> t61=aov(Vanilla~Panelist+Product+Panelist:Session+Panelist:Product)

> summary(t61)



# Sweetness

>t7=aov(Sweetness~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t7)



Page

27



> t71=aov(Sweetness~Panelist+Session+Product+Panelist:Session)

> summary(t71)



# Acidity

>t8=aov(Acidity~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t8)



> t81=aov(Acidity~Panelist+Product+Panelist:Session+Panelist:Product)

> summary(t81)



# Bitterness

>t9=aov(Bitterness~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t9)



Page

28



> t91=aov(Bitterness~Panelist+Session+Product+Panelist:Product)

> summary(t91)



> t92=aov(Bitterness~Panelist+Session+Product)

> summary(t92)



> TukeyHSD(t92)

# Astringency

>t10=aov(Astringency~Panelist+Session+Product+Panelist:Session+Panelist:Product+Sess

ion:Product)

> summary(t10)



> t101=aov(Astringency~Panelist+Product)



Page

29



> summary(t101)



> TukeyHSD(t101)

# Crunchy

>t11=aov(Crunchy~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t11)



> t111=aov(Crunchy~Panelist+Session+Product+Panelist:Session+Panelist:Product)

> summary(t111)



# Melting

>t12=aov(Melting~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produc

t)

> summary(t12)



Page

30



> t121=aov(Melting~Panelist+Session+Product+Panelist:Product)

> summary(t121)



> t122=aov(Melting~Panelist+Product+Panelist:Product)

> summary(t122)



# Sticky

>t13=aov(Sticky~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Product)

> summary(t13)



> t131=aov(Sticky~Panelist+Product+Panelist:Session+Session:Product)

> summary(t131)



Page

31



> t132=aov(Sticky~Panelist+Product+Session:Product)

> summary(t132)



> TukeyHSD(t132)

# Granular

>t14=aov(Granular~Panelist+Session+Product+Panelist:Session+Panelist:Product+Session:Produ

ct)

> summary(t14)



> t141=aov(Granular~Panelist+Product+Panelist:Product)

> summary(t141)



4.2

> x1=c(4,6,4,5,5,5,4,6,5,5,4,5,5,4,5,4,6,5,5,5,5,5,4,5,5,3,5,5,6,5,6,5,5,5,4,4)



Page

32



> lan1=matrix(x1,6,6)

>dimnames(lan1)=list(c("choc1","choc2","choc3","choc4","choc5","choc6"),c("hang1","h

ang2","hang3","hang4","hang5","hang6"))

> chisq.test(lan1)



> x2=c(5,5,5,4,6,4,5,3,6,5,4,6,5,5,5,5,5,4,4,6,4,5,6,4,6,4,4,5,4,6,4,6,5,5,4,5)

> lan2=matrix(x2,6,6)

>dimnames(lan2)=list(c("choc1","choc2","choc3","choc4","choc5","choc6"),c("hang1","h

ang2","hang3","hang4","hang5","hang6"))

> chisq.test(lan2)



Page

33



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

3 Vẽ biểu đồ radar mô tả tính chất của các sản phẩm

Tải bản đầy đủ ngay(0 tr)

×