adding regression curve to xyplot
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