Повторные измерения ANOVA в R (сплит-дизайн) - PullRequest
0 голосов
/ 26 марта 2019

Я пытаюсь подогнать повторяющиеся измерения ANOVA из эксперимента с расщепленным сюжетом и несколькими измерениями во времени.

Схема эксперимента выглядит следующим образом:

У меня есть 9 блоков в поле.Внутри каждого блока у меня есть два вспомогательных участка, представляющих фактор разделения (названный trt , "с" или "без" определенного лечения).Внутри каждого подзаговора (с или без) у меня есть еще один фактор разделения с двумя квадратами (названный sp , "вид 1", "вид 2").В каждом квадрате у меня есть два сеянца каждого вида в исследовании (каждый сеянец идентифицируется по уникальному идентификатору).Наконец, я проверил заданную переменную отклика для каждого сеянца в эксперименте по 4 повторным измерениям во времени (недели).

Поэтому у меня 9 блоков, 2 обработки внутри каждого блока, 2 вида внутри каждой обработки и 2саженцы от каждого вида.Это контролировалось в течение 4 недель.

Я хочу понять, повлияет ли время * trt * sp на мою переменную ответа.

Учитывая мой экспериментальный план, является ли следующий код правильной спецификацией термина Error для подгонки под разделение повторяющихся мер aov?-split-plot model?

fit <- aov(response ~ time * sp * trt + Error(block/trt/sp/id), data = d3)
summary(fit)

Error: block
          Df Sum Sq Mean Sq F value Pr(>F)
Residuals  1  11.29   11.29               

Error: block:trt
    Df Sum Sq Mean Sq
trt  1  0.114   0.114

Error: block:trt:sp
       Df Sum Sq Mean Sq
sp      1  61.14   61.14
sp:trt  1  10.27   10.27

Error: block:trt:sp:id
          Df Sum Sq Mean Sq F value Pr(>F)
sp         1   7.16   7.159   2.299  0.141
trt        1   1.07   1.072   0.344  0.562
sp:trt     1   2.18   2.181   0.701  0.410
Residuals 28  87.17   3.113               

Error: Within
             Df Sum Sq Mean Sq F value Pr(>F)
time          1   0.38  0.3781   0.237  0.627
time:sp       1   0.93  0.9317   0.585  0.446
time:trt      1   1.91  1.9117   1.201  0.276
time:sp:trt   1   2.73  2.7257   1.712  0.194
Residuals   104 165.59  1.5922   

Этот код приводит к появлению следующего предупреждающего сообщения:

Warning message:
In aov(response ~ time * sp * trt + Error(block/trt/sp/id), data = d3) :
  Error() model is singular

Я действительно ценю любую помощь по этому вопросу.Большое спасибо!Я с радостью предоставлю любую дополнительную информацию, если она понадобится.

Данные и графики

Для иллюстрации результатов enter image description here

Данные для воспроизводимостипредставлен ниже (печать dput):

Редактировать 1 (обновленный набор данных):

structure(list(block = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 
3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 7L, 
7L, 7L, 7L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 1L, 1L, 1L, 1L, 2L, 
2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 
6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 1L, 
1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 
5L, 5L, 5L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 9L, 
9L, 9L, 9L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 
4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 
8L, 8L, 8L, 9L, 9L, 9L, 9L), trt = c("without", "without", "with", 
"with", "with", "with", "without", "without", "with", "with", 
"without", "without", "with", "with", "without", "without", "with", 
"with", "without", "without", "with", "with", "without", "without", 
"without", "without", "with", "with", "with", "with", "without", 
"without", "without", "without", "with", "with", "without", "without", 
"with", "with", "with", "with", "without", "without", "with", 
"with", "without", "without", "with", "with", "without", "without", 
"with", "with", "without", "without", "with", "with", "without", 
"without", "without", "without", "with", "with", "with", "with", 
"without", "without", "without", "without", "with", "with", "without", 
"without", "with", "with", "with", "with", "without", "without", 
"with", "with", "without", "without", "with", "with", "without", 
"without", "with", "with", "without", "without", "with", "with", 
"without", "without", "without", "without", "with", "with", "with", 
"with", "without", "without", "without", "without", "with", "with", 
"without", "without", "with", "with", "with", "with", "without", 
"without", "with", "with", "without", "without", "with", "with", 
"without", "without", "with", "with", "without", "without", "with", 
"with", "without", "without", "without", "without", "with", "with", 
"with", "with", "without", "without", "without", "without", "with", 
"with"), sp = c("species 1", "species 2", "species 2", "species 1", 
"species 2", "species 1", "species 2", "species 1", "species 1", 
"species 2", "species 2", "species 1", "species 2", "species 1", 
"species 1", "species 2", "species 1", "species 2", "species 2", 
"species 1", "species 2", "species 1", "species 1", "species 2", 
"species 1", "species 2", "species 1", "species 2", "species 1", 
"species 2", "species 2", "species 1", "species 2", "species 1", 
"species 2", "species 1", "species 1", "species 2", "species 2", 
"species 1", "species 2", "species 1", "species 2", "species 1", 
"species 1", "species 2", "species 2", "species 1", "species 2", 
"species 1", "species 1", "species 2", "species 1", "species 2", 
"species 2", "species 1", "species 2", "species 1", "species 1", 
"species 2", "species 1", "species 2", "species 1", "species 2", 
"species 1", "species 2", "species 2", "species 1", "species 2", 
"species 1", "species 2", "species 1", "species 1", "species 2", 
"species 2", "species 1", "species 2", "species 1", "species 2", 
"species 1", "species 1", "species 2", "species 2", "species 1", 
"species 2", "species 1", "species 1", "species 2", "species 1", 
"species 2", "species 2", "species 1", "species 2", "species 1", 
"species 1", "species 2", "species 1", "species 2", "species 1", 
"species 2", "species 1", "species 2", "species 2", "species 1", 
"species 2", "species 1", "species 2", "species 1", "species 1", 
"species 2", "species 2", "species 1", "species 2", "species 1", 
"species 2", "species 1", "species 1", "species 2", "species 2", 
"species 1", "species 2", "species 1", "species 1", "species 2", 
"species 1", "species 2", "species 2", "species 1", "species 2", 
"species 1", "species 1", "species 2", "species 1", "species 2", 
"species 1", "species 2", "species 1", "species 2", "species 2", 
"species 1", "species 2", "species 1", "species 2", "species 1"
), id = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 
11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 
24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 
1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 
15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 
28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 36L, 1L, 2L, 3L, 4L, 
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 
19L, 20L, 21L, 22L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 
32L, 33L, 34L, 35L, 36L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 
10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 
23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L, 33L, 34L, 35L, 
36L), .Label = c("1", "2", "3", "4", "5", "6", "7", "8", "9", 
"10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", 
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", 
"32", "33", "34", "35", "36"), class = "factor"), time = c(1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 
3L, 3L, 3L,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