Message-ID: <200411301043.04179.deepayan@stat.wisc.edu>
Date: 2004-11-30T16:43:04Z
From: Deepayan Sarkar
Subject: adding regression curve to xyplot
In-Reply-To: <Pine.LNX.4.61.0411301621130.10751@gannet.stats>
On Tuesday 30 November 2004 10:24, Prof Brian Ripley wrote:
> On Tue, 30 Nov 2004, Carlisle Thacker wrote:
> > Dear R-listers,
> >
> > It seems that predict() behaves differently within panel.xyplot.
> > Am I doing something stupid?
>
> You fitted the model lm(x ~ y) and supplied new values for t, not y.
>
> Using panel.abline would be a bit easier: just call
> panel.abline(thislm) from your panel function.
That wouldn't quite work, since the response and predictor are switched
in the lm fit.
Deepayan