Re: [R] rlm results on trellis plot

2007-06-08 Thread deepayan . sarkar
On 6/7/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > How do I add to a trellis plot the best fit line from a robust fit? I > can use panel.lm to add a least squares fit, but there is no panel.rlm > function. Well, panel.lmline (not panel.lm, BTW) is defined as: > panel.lmline function (x, y, ..

Re: [R] rlm results on trellis plot

2007-06-08 Thread Bert Gunter
I don't think the code below does what's requested, as it assumes a single overall fit for all panels, and I think the requester wanted separate fits by panel. This can be easily done, of course, by a minor modification: xyplot( y ~ x | z, panel = function(x,y,...){ panel.xyplot(x,

Re: [R] rlm results on trellis plot

2007-06-08 Thread hadley wickham
On 6/7/07, Alan S Barnett <[EMAIL PROTECTED]> wrote: > How do I add to a trellis plot the best fit line from a robust fit? I > can use panel.lm to add a least squares fit, but there is no panel.rlm > function. It's not trellis, but it's really easy to do this with ggplot2: install.packages("ggplo

Re: [R] rlm results on trellis plot

2007-06-08 Thread Chuck Cleland
Alan S Barnett wrote: > How do I add to a trellis plot the best fit line from a robust fit? I > can use panel.lm to add a least squares fit, but there is no panel.rlm > function. How about using panel.abline() instead of panel.lmline()? fit1 <- coef(lm(stack.loss ~ Air.Flow, data = stackloss))

[R] rlm results on trellis plot

2007-06-08 Thread Alan S Barnett
How do I add to a trellis plot the best fit line from a robust fit? I can use panel.lm to add a least squares fit, but there is no panel.rlm function. -- Alan S Barnett <[EMAIL PROTECTED]> NIMH/CBDB __ R-help@stat.math.ethz.ch mailing list https://stat.