From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>

Date: Wed 15 Jun 2005 - 19:38:23 EST

Date: Wed 15 Jun 2005 - 19:38:23 EST

"Bela Bauer" <bela_b@gmx.net> writes:

*> Hi,
**>
*

> yet another anova.mlm problem - it doesn't seem to end.

*> This time, I have a setup with a few within-subject factors and a
**> between-subject factor (SGROUP). Consider the most simple case with only one
**> within-factor (apo):
**>
**> > mlmfit0 <- lm(data.n ~ 0 + SGROUP)
**> > mlmfit1 <- lm(data.n ~ 1 + SGROUP)
**> > anova(mlmfit1,mlmfit0,test="Spherical",M=~hemi,X=~1)
**> Analysis of Variance Table
**>
**> Model 1: data.n ~ 1 + SGROUP
**> Model 2: data.n ~ 0 + SGROUP
**>
**> Contrasts orthogonal to
**> ~1
**>
**>
**> Contrasts spanned by
**> ~hemi
**>
**> Greenhouse-Geisser epsilon: 0.6829
**> Huynh-Feldt epsilon: 0.7127
**>
**> Res.Df Df Gen.var. F num Df den Df Pr(>F) G-G Pr H-F Pr
**> 1 22 0.54295
**> 2 22 0 0.54295 Inf 0 44
**> Warning messages:
**> 1: NaNs produced in: pf(q, df1, df2, lower.tail, log.p)
**> 2: NaNs produced in: pf(q, df1, df2, lower.tail, log.p)
**> 3: NaNs produced in: pf(q, df1, df2, lower.tail, log.p)
**>
**>
**> Now, those G-G and H-F epsilons it gives me are correct (at least G-G, the
**> H-F seems to be affected by the R vs SAS difference in the calculation). But
**> whatever happened to everything else?
**> I've played around with the source in mlm.R, and it looks to be as though
**> the problem is related to this:
**> https://stat.ethz.ch/pipermail/r-devel/2005-April/032925.html
**>
**> Is there a solution to this problem? Am I doing something wrong? The data
**> looks like this:
*

You're fitting the same model twice, so you get zero DF for the difference. If you want to compare a model with a difference between the two groups to one with no difference (in the relevant contrasts), you need to compare

mlmfit0 <- lm(data.n ~ SGROUP)

mlmfit1 <- lm(data.n ~ 1)

-- O__ ---- Peter Dalgaard ุster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlReceived on Wed Jun 15 19:41:48 2005

*
This archive was generated by hypermail 2.1.8
: Fri 03 Mar 2006 - 03:32:39 EST
*