How can I determine if a factor A
is nested in B
or B
is nested in A
in a repeated measures design?
For example,
data <- data.frame(customer=rep(c("cus1","cus2","cus3","cus4","cus5","cus6"), each=3), brand=rep(c("A","B","C"),times=6), ratings=runif(18))
Brand
is fixed and customer
is the random effect. This is a crossed design I think because every customer rates the same brands. How would you determine which is the lower level, is it customer
or brand
?
In other words, should it be
Example 1
cus1 | cus2
A B C | A B C
or
Example 2
A | B | C
cus1 cus2 | cus1 cus2 | cus1 cus2