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, ..
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,
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
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))
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.