俺的学习笔记

Tuesday, December 4, 2018

Bartlett Test

刚才的ANOVA Test是用来测试3个以上的组的平均值有无差异,现在这个Bartlett Test是用来测试3个以上的组的方差有无差异
A组301, 311, 325, 291, 388, 402, 325, 361, 287, 261, 238, 362
B组197, 180, 178, 260, 247, 199, 179, 134, 163, 200
C组209, 331, 192, 155, 234, 290, 175, 116, 285, 216, 237, 301
D组343, 247, 316, 395, 324, 138, 245, 228, 214, 374, 235
这个可以用R的bartlett.test函数来计算:
vx=c(301311325291388402325361287261238362,
 197, 180178260247199179134163200209331192155,
 234, 290175116285216237301343247316395324138,
 245, 228214374235)
> fx=factor(rep(c("A", "B", "C", "D"), c(12, 10, 12, 11)))
> bartlett.test(formula=vx~fx)

  Bartlett test of homogeneity of variances

data: vx by fx
Bartlett's K-squared = 5.2629, df = 3, p-value = 0.1535
(from here)

Labels: , ,

0 Comments:

Post a Comment

<< Home