s-news
[Top] [All Lists]

loess by groups in xyplot

To: S-news <s-news@lists.biostat.wustl.edu>
Subject: loess by groups in xyplot
From: Andrew Beckerman <a.p.beckerman@stir.ac.uk>
Date: Thu, 26 Jul 2001 13:12:21 +0100
Dear listers -

SPlus2000 R3 WinNT4

I have an xyplot with 4x2 panels, and 2 groups within each panel denoted by different symbols:

xyplot(recruit~log.mxjd|feed.code*f.batch,groups=rear,jmaster,panel=panel.superpose)

I would like to fit a loess to each group in each panel, i.e. two different loess fits corresponding to each group. Is there a handy adjustment to panel=function(x,y){panel.xyplot(x,y) panel.loess(x,y) panel.superpose(x,y)} to accomplish this (this simply fits a loess to all of the data in the panel and cannot be called with groups=)?

I recognize that I could simply expand the trellis display to 16 panels...

And, can this be done with splines?

Cheers
andrew

--
The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
be contained in this message.  If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.  In such case, you should destroy this
message and kindly notify the sender by reply email.  Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official
business of the University of Stirling shall be understood as neither
given nor endorsed by it.


<Prev in Thread] Current Thread [Next in Thread>
  • loess by groups in xyplot, Andrew Beckerman <=