在R中没有获得正确的自由度

时间:2017-11-11 16:13:47

标签: r statistics anova

我不确定我做错了什么。这是我正在使用的数据:

dtf <- read.table(text=
"Litter Treatment Tube.L
      1   Control   1641
      2   Control   1290
      3   Control   2411
      4   Control   2527
      5   Control   1930
      6   Control   2158
      1        GH   1829
      2        GH   1811
      3        GH   1897
      4        GH   1506
      5        GH   2060
      6        GH   1207
      1       FSH   3395
      2       FSH   3113
      3       FSH   2219
      4       FSH   2667
      5       FSH   2210
      6       FSH   2625
      1    GH+FSH   1537
      2    GH+FSH   1991
      3    GH+FSH   3639
      4    GH+FSH   2246
      5    GH+FSH   1840
      6    GH+FSH   2217", header=TRUE)

我做的是:

BoarsMod1 <- aov(Tube.L ~ Litter + Treatment, data=dtf)
anova(BoarsMod1)

litter我获得的自由度数不正确。它应该是5(因为有6个垃圾块)但它是1.我做错了吗?

0 个答案:

没有答案
相关问题