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
customer(likeexample 1) or is itbrand(likeexample 2)? For example in Robert's answer here, there is an example of a crossed design whereclassis level 1 andschoollevel 2 – locus Feb 19 '19 at 21:03(1|school)+(1|class), as you can see these are not intertwined. – user2974951 Feb 20 '19 at 07:35