[R] anova(mylme, type = ??)

Marc Schwartz MSchwartz at medanalytics.com
Wed Nov 19 23:54:18 CET 2003


On Wed, 2003-11-19 at 16:34, John Christie wrote:
> OK, I found pretty much everything I needed in the short term on lme.  
> However, I cannot find anything on the "type" flag in the anova 
> command.  When is it used and what for?  In the examples I have found 
> type="marginal" is usually entered for lme models with fixed effects.
> 
> This is one of the few items that I have done an entire R site search 
> for without anything but other examples of this question - unanswered.
> 
> It is odd that there is no documentation for a value you can pass to 
> one of the commands.


Try:

?anova.lme

presuming that you have already done library(nlme).

Keep in mind that anova() is a "high level" function that has several
methods based upon the nature of the object passed to it. To see what
methods are available use:

methods(anova)

If you do that prior to library(nlme), you get:

> methods(anova)
[1] anova.glm     anova.glmlist anova.lm      anova.loess*
[5] anova.loglm*  anova.mlm     anova.negbin* anova.nls*

    Non-visible functions are asterisked


If you do it after library(nlme), you get:

> methods(anova)
 [1] anova.glm     anova.glmlist anova.gls*    anova.lm
 [5] anova.lme     anova.lme1*   anova.loess*  anova.loglm*
 [9] anova.mlm     anova.negbin* anova.nls*
 
    Non-visible functions are asterisked


The above reflects the additional anova methods provided in the nlme
package.

In your case, you are passing an nlme model object to anova, hence the
anova.nlme method is used. The details for the arguments will be listed
in the method specific help.

HTH,

Marc Schwartz




More information about the R-help mailing list