[Rd] Non-nested testing and anova.lm()

roger koenker rkoenker at uiuc.edu
Tue May 24 18:32:00 CEST 2005

I'd like to elicit comments on what I am sure is an ancient topic, but
one for which  I can't seem to google up a satisfactory reference.

I'm curious about the laissez-faire attitude adopted in anova.lm
and friends regarding non-nested hypothesis tests.  I was under
the misapprehension until yesterday that attempts to test
non-nested hypotheses, i.e. compare lm objects with non-nested
design matrices, produced an error.  On the contrary, not even a
warning is generated.  The Ur text on this sort of thing (aka The
White Book)  seems to suggest (p 210) that test statistics  are
computed only when models are nested, but ?anova.lm is quite

      For all but the first model, the change in degrees of freedom  
and sum
      of squares is also given. (This only make statistical sense if the
      models are nested.)  It is conventional to list the models from
      smallest to largest, but this is up to the user.

My motivation for the question is that I'm considering  reworking the
code for anova.rq in my quantreg package. Currently, I have a rather
half-hearted attempt to check nesting using variable names, and
was considering implementing something more algebraic based
on explicitly looking at subspace inclusions, but now I'm wondering
if R's caveat emptor policy might be a viable alternative.  Any
comments would be welcome.

>>> url:    www.econ.uiuc.edu/~roger                Roger Koenker
>>> email   rkoenker at uiuc.edu                       Department of   
>>> Economics
>>> vox:    217-333-4558                            University of   
>>> Illinois
>>> fax:    217-244-6678                            Champaign, IL 61820

More information about the R-devel mailing list