[R] anova(lme object)

2003-08-21 Thread Mahbub Latif
Hi, I use lme to fit models like R res1 - lme(y~A+B, data=mydata, random=~1|subject) R res2 - lme(y~B+A, data=mydata, random=~1|subject) (only difference between these two models are the sequence in which the indep variables are written in formula) where y is continuous and A, B, and subject

RE: [R] anova(lme object)

2003-08-21 Thread Liaw, Andy
Yes. One way is to use anova(res1, type=marginal). Read the help page and the book (or any decent linear models book). Andy -Original Message- From: Mahbub Latif [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 12:51 PM To: [EMAIL PROTECTED] Subject: [R] anova(lme object

Re: [R] anova(lme object)

2003-08-21 Thread Prof Brian Ripley
On Thu, 21 Aug 2003, Mahbub Latif wrote: Hi, I use lme to fit models like R res1 - lme(y~A+B, data=mydata, random=~1|subject) R res2 - lme(y~B+A, data=mydata, random=~1|subject) (only difference between these two models are the sequence in which the indep variables are written in

Re: [R] anova(lme object)

2003-08-21 Thread Spencer Graves
The different answers reflect a lack of symmetry in the data set. The standard A+B anova evaluates the effect of A by itself and B given A. The other evalutes the effect of B by itself plus A given B. They answer different questions. If you want the same answer from A+B as from B+A, you

Re: [R] anova(lme object)

2003-08-21 Thread Bjørn-Helge Mevik
It is documented in ?anova.lme: anova(res1, type=marginal) and anova(res2, type=marginal) should give equivalent tables. -- Bjørn-Helge Mevik __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] anova(lme object)

2003-08-21 Thread Spencer Graves
You need to say library(nlme) first. Without that, ?anove.lme [in R 1.7.1 under Windows 2000] and produced for me the following: Error in help(anova.lme, htmlhelp = FALSE) : No documentation for `anova.lme' in specified packages and libraries: you could try `help.search(anova.lme)'