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

> 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



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:Product)

Page 22



> summary(t1)



>t11=aov(CocoaA~Paneli

st+Product)

> summary(t11)



> TukeyHSD(t11)

# MilkA

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

> summary(t2)



> t21=aov(MilkA~Panelist+Product)

> summary(t21)



> TukeyHSD(t21)

Page 23



# CocoaF

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

> summary(t3)



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

> summary(t31)



# MilkF

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

> summary(t4)



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

> summary(t41)



Page 24



# Caramel

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

> summary(t5)



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

> summary(t51)



# Vanilla

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

> summary(t6)



Page 25



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

> summary(t61)



# Sweetness

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

> summary(t7)



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

> summary(t71)



# Acidity

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

> summary(t8)



Page 26



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

> summary(t81)



# Bitterness

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

> summary(t9)



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

> summary(t91)



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

> summary(t92)

Page 27



> TukeyHSD(t92)

# Astringency

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

uct)

> summary(t10)



> t101=aov(Astringency~Panelist+Product)

> summary(t101)



> TukeyHSD(t101)

# Crunchy

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

> summary(t11)



Page 28



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

> summary(t111)



# Melting

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

> summary(t12)



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

> summary(t121)



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

> summary(t122)



# Sticky

Page 29



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



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

> summary(t132)



> TukeyHSD(t132)

# Granular

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

> summary(t14)



Page 30



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

> lan1=matrix(x1,6,6)

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

ang3","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","hang2","h

ang3","hang4","hang5","hang6"))

> chisq.test(lan2)



Page 31



Page 32



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)

×