I want to test which factor is more significant in explaining the data. Also, I want to test whether there is an interaction or not.

It is not a crossed design because every level of one factor does not occur in all levels of the other. eg B1 does not occur in level A3. However, this is not a nested design either because A1 does not contain B1 without A2 containing B1. Likewise, B1 does not contain A2 without B2 containing A2.

A<-gl(3,2) #factor of 3 levels 
B<-gl(2,3) #factor of 2 levels 
y<-rnorm(6,10) #response


          y A B
1 11.944285 1 1
2 10.058154 1 1
3 10.618764 2 1
4 10.928283 2 2
5 10.286781 3 2
6  9.695895 3 2

I am guessing that there is something wrong with this experiment. What is wrong with this design?


1 Answer 1


From the perspective of investigating the interaction, what's wrong with the design is that you're missing data from some cells of the "design matrix".

In simplest terms what is testing an interaction asking? Is there a difference between the differences.

For A, you may want to know whether there's a difference between 1 and 2 (or 2 and 3). For B, you may want to know whether there's a difference between 1 and 2. When it comes to the interaction between A and B though, what you want to know is whether there's a difference in the size of the difference between A1 and A2 when B is 1 than when B is 2.

In this design, you have no data about A1 when B is 2. It should go without saying that you can only analyse data you have. If the data's not there, you can't do an analysis, and consequently you can't test the interaction.

For testing the relative strengths of A and B (the main effects, rather than the interaction), that's a little more doable, but because of B varying within A2, there will be some variance you can't account for, which could potentially give you erroneous results.

  • $\begingroup$ @Thanks Ian_Fin. That's an easy to understand explanation. $\endgroup$ Commented Aug 9, 2016 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.