Re: [Rd] anova and intercept

2022-12-27 Thread Greg Snow
Why compute the differences manually when `aov` can do paired comparisons on this data as is: summary(aov(extra ~ factor(group) + Error(ID), data=sleep )) gives the same F and P values On Tue, Dec 27, 2022 at 3:32 AM Gabor Grothendieck wrote: > > Good idea. > > On Mon, Dec 26, 2022 at 12:59 PM

Re: [Rd] anova and intercept

2022-12-27 Thread Gabor Grothendieck
Good idea. On Mon, Dec 26, 2022 at 12:59 PM peter dalgaard wrote: > > My usual advice on getting nonstandard F tests out of anova() is to fit the > models explicitly and compare. > > So how about this? > > fit1 <- lm(diff(extra,10) ~ 1, sleep) > fit0 <- update(fit1, ~ -1) > anova(fit0, fit1) > >