Skip to content
Prev 315602 / 398506 Next

lattice: loess smooths based on y-axis values

Reanne:


UNTESTED:

I would reverse the xyplot call as xyplot(x~y,...) to get all axes set
up properly and then just write an explicit panel function using
loess() and predict.loess the "correct" way, e.g. as loess(y~x) to get
the (x,y) curve pairs to be plotted  via panel.lines(y,x....). You
will have to make sure the pairs are ordered in decreasing x.

This presumes familiarity with loess() and lattice panel functions, of
course. Deepayan's book is a comprehensive resource for the latter.
Murrell's also contains a less comprehensive but probably adequate
overview. -- If you need anything at all, that is.

-- Bert



On Fri, Jan 18, 2013 at 3:36 AM, Raeanne Miller
<Raeanne.Miller at sams.ac.uk> wrote: