s-news
[Top] [All Lists]

Re: anova.lme and contrast options

To: Lorenz.Gygax@fat.admin.ch
Subject: Re: anova.lme and contrast options
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Mon, 19 May 2003 12:53:34 +0100 (BST)
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <210BCBFA22E42D4C9135491A294984DE57A784@evd-s7013.evd.admin.ch>
On Mon, 19 May 2003 Lorenz.Gygax@fat.admin.ch wrote:

> We are currently evaluating data from observations of bulls (4 groups with 5
> animals each) which have been kept on varying areas where they lie down
> (three different ground surfaces and four different slopes). All animals
> were kept on all possible combinations of surfaces and slopes and we attempt
> to model some changes over time as well.
> 
> Thus we started out in the following way (SPlus 6.1 for Windows):
> res.lme <- lme (fixed= response ~ slope * surface + time + time^2,
>                 random= ~ . | group/bull)
> 
> Slope and time are included as numeric variables, surface as a factor.
> 
> To get a better interpretation of the estimated effects, we want to use:
> options (contrasts= c (factor= 'contr.treatment', ordered= 'contr.poly'))
> 
> I was surprised to see that anova (res.lme, type= 'marginal') gives very
> different p-values (in one example 0.85 instead of 0.04) for the numeric
> variable 'slope' and also summary (res.lme) gives quite different estimates
> for 'slope'. The results of anova (res.lme) are identical with the default
> and chosen contrasts.
> 
> Any idea what could happen here? I always thought that changing contrasts
> should not affect the overall significance of a variable, least of all the
> one of a numeric variable.

That's not right: slope is interacting with surface, so what `slope' by
itself means depends on the coding.  For treatment contrasts it is the
slope on the first surface, and for Helmert contrasts it is the average
slope over surfaces (and how exactly it is averaged is hard to state in 
general).

This is an example of why `type III' sums of squares can be misleading. In
anova(res.lme, type= 'marginal') you are doing something very closely
related, and you are not respecting the hierarchy of terms in your model.
The test that you get by dropping a term marginal to an interaction is
hard to interpret (at best) and depends on the coding.  It is not what a
likelihood ratio test would give when dropping that term from the model
formula (which in this case would recode the interaction and be the same 
model, I believe).

Some of us think one should never use this type of anova: when 
occasionally the tests it implies are useful there are clearer ways to 
produce them.

-- 
Brian D. Ripley,                  ripley@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


<Prev in Thread] Current Thread [Next in Thread>