[R] adding regression curve to xyplot
Deepayan Sarkar
deepayan at stat.wisc.edu
Tue Nov 30 17:43:04 CET 2004
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
More information about the R-help
mailing list