On 2011-03-11 13:33, Jeff Newmiller wrote:
Thank you for indicating more precisely where the bug arises.

I disagree with the blanket assertion that the I() is not needed. The
example is purposely simplified to illustrate the problem, which lm has
no difficulty with but which plot.lm does. plot.lm manages to deal with
I() on the right side, why doesn't it deal similarly with the left side?

As pd says, you can always wrap your I() in unclass().
Other alternatives are:
- skip the QQ-plot with plot(model, which=c(1,3:5))
  and then do the QQ-plot separately with

  qqnorm(c(resid(model)); qqline(c(resid(model))

- remove the class attribute from the residuals
  component of the model with

  class(model$residuals) <- NULL

Curiously, the code for abline used to handle this,
but somewhere along the line it gained the class check.
(I haven't bothered to check the NEWS.)

Peter Ehlers


---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnew...@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------

<snip>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to