Re: [R] how to explain the interaction terms regarding treatmentcontrast of lm model

2009-08-29 Thread zrl
Thank you all for your help. Daniel, I want to know if I really understand your answer. I calculated each group mean and sub mean as below: tapply(val,group,mean) group1 group2 group3 4.215670 5.664411 7.210819 tapply(val,sub,mean) abcd 4.856927 5.199305

Re: [R] how to explain the interaction terms regarding treatmentcontrast of lm model

2009-08-28 Thread Daniel Malter
The intercept is group=1, sub=a, The interaction between sub=b and group=2 implies that both sub=b and group=2 direct effects are included. That is, with the direct effects only you are now at: intercept+group2+subb, which means the intercept (group1 and sub=a) + the average difference between