Re: [R] nested structure for Ancova

2017-03-12 Thread li li
Thanks so much, Richard. That works. Hanna 2017-03-12 14:31 GMT-04:00 Richard M. Heiberger : > I think you need either > > mod4 <- lm( y ~ -1 + area / (month*group), data=two) > > mod5 <- lm( y ~ area / (month*group), data=two) > > With either of those, area:month and area:group and Residuals

Re: [R] nested structure for Ancova

2017-03-12 Thread Richard M. Heiberger
I think you need either mod4 <- lm( y ~ -1 + area / (month*group), data=two) mod5 <- lm( y ~ area / (month*group), data=two) With either of those, area:month and area:group and Residuals add up. On Sun, Mar 12, 2017 at 10:39 li li wrote: > Hi All, > I have a dataset which contains 4 varia

Re: [R] nested structure for Ancova

2017-03-12 Thread Michael Dewey
Dear Hannah You say they are different (mod3 from mod1 and mod2) but in what way are the results different? On 12/03/2017 15:38, li li wrote: Hi All, I have a dataset which contains 4 variables: area, group, time, y, Area is a factor that has two levels A and B, group is a factor that is ne

[R] nested structure for Ancova

2017-03-12 Thread li li
Hi All, I have a dataset which contains 4 variables: area, group, time, y, Area is a factor that has two levels A and B, group is a factor that is nested within area. There are four groups within each area. y is the response variable, and time refers to different days. Below is the how data lo