Description: Temperature if six objects (obj_A, obj_B,...obj_F) was measured in 1 hour intervals (1,2...10) Objects were under the influence of two treatments (A and B). Treatment A = obj_A, obj_B, obj_C; treatment B = obj_D, obj_E, obj_F.
Problem is that measured values of each object are serially correlated, therefore I can not use classical ANOVA. How to take into account such fact?
# example data
my.data <- data.frame(object = rep(c("obj_A","obj_B","obj_C",
"obj_D","obj_E","obj_F"),
each = 10),
time = rep(c(1:10), times = 6),
treatment = rep(c("A","B"), each = 30),
value = c(4,4,7,8,8,10,8,12,14,12,
8,8,12,12,10,12,10,11,12,16,
12,12,11,13,12,16,16,14,16,20,
11,20,23,27,31,29,31,32,28,30,
12,16,17,23,22,24,33,31,31,32,
14,13,19,20,24,26,24,28,25,23))
# converting values to time series object
obj_A <- ts(my.data$value[my.data$object=="obj_A"],
start = 1, end = 10, frequency = 1)
obj_B <- ts(my.data$value[my.data$object=="obj_B"],
start = 1, end = 10, frequency = 1)
obj_C <- ts(my.data$value[my.data$object=="obj_C"],
start = 1, end = 10, frequency = 1)
obj_D <- ts(my.data$value[my.data$object=="obj_D"],
start = 1, end = 10, frequency = 1)
obj_E <- ts(my.data$value[my.data$object=="obj_E"],
start = 1, end = 10, frequency = 1)
obj_F <- ts(my.data$value[my.data$object=="obj_F"],
start = 1, end = 10, frequency = 1)
# plot -> blue = treatment A; red = treatment B
ts.plot(obj_A, obj_B, obj_C, obj_D, obj_E, obj_F,
col=c("deepskyblue","deepskyblue1","deepskyblue2",
"darkred","indianred","indianred1"),
lwd = 2.5, lty = 2, xlab = "time", ylab = "temperature")
How to rigorously test whether temperature of objects differ according to used treatment, but without ignoring serial correlation?