[R] model.tables limitations

Prof. Brian Ripley ripley at stats.ox.ac.uk
Mon Mar 31 23:02:39 CEST 2003

On Tue, 1 Apr 2003, Patrick Connolly wrote:

> There is a warning in the help file for model.tables
> Warning:
>      The implementation is incomplete, and only the simpler cases have
>      been tested thoroughly.
>      Weighted `aov' fits are not supported.
> Could it be that 'simpler cases' excludes those with any NAs?  I get
> an error message:
> Error in replications(paste("~", paste(names(tables), collapse = "+")),  : 
> 	na.action must be a function
> Could it simply be that na.action = na.omit doesn't make it through,
> or should I be looking somewhere else?

This is fixed in R-devel, but for now run na.omit explicitly in advance of 
your fit.  The issue is that na.omit leaves information on the model frame 
that replications() does not understand.

That said, model.tables basically assumes balance, and although it works 
correctly for unbalanced fits, I doubt if people actually want the results 
it gives.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list