s-news
[Top] [All Lists]

Re: Multivariate loess models: testing interactions

To: Ray Webster <WebsterR@landcare.cri.nz>
Subject: Re: Multivariate loess models: testing interactions
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Tue, 19 Dec 2000 08:07:40 +0000 (GMT)
Cc: s-news@wubios.wustl.edu
In-reply-to: <sa3fa268.096@landcare.cri.nz>
On Tue, 19 Dec 2000, Ray Webster wrote:

> I'm sure there's a simple explanation for this...
> 
> The manuals outline an example of fitting multivariate loess models using
> the ethanol data (page 352 of Guide to Statistics V1, S-Plus 2000 for
> windows).  They fit the following model:
> 
> > ethanol.m <- loess(NOx ~ C * E, data = ethanol)
> 
> As far as I can tell, this is equivalent to fitting the model without the
> interaction, ie NOx ~ C + E, or to be more precise, the fitted values of the
> latter model indicate an interaction term has been included also.
> 
> Can someone tell me why this should be the case, and if I can actually
> test for an interaction between two predictors with these models (using
> anova function)?  

The formula notation is confusing you (and `multivariate' is confusing me,
as this is like multiple linear regression, not multivariate linear
regression: seems the person who wrote that S-PLUS manual made this up as
it is not in the White Book, that I can see).
  
Loess fits a smooth curve or surface in all the input variables. It does
not fit an additive model (a sum of smooth functions of individual
inputs), but gam can.
  
`Interactions' of continuous variables like this make little sense,
but in a linear model they stand for cross-product terms, so
  
y ~ (x + z)^2
  
expands to
  
y ~ x + z + x:z        
  
which is

y = b_0 + b_1 x + b_2 z + b_3 xz                   

and b_3 xz is the `interaction' x:z in the model.  This is not usually
what you want!

For a gam, you can contrast

gam(y ~ lo(x) + lo(z))
gam(y ~ lo(x, z))

and even do an anova on the pair of models.  However, as they are not
nested, that will make little sense.

-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


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