[R] Re: regression diagnostics [Re: two new packages]
John Fox
jfox at mcmaster.ca
Sat Apr 28 15:58:11 CEST 2001
At 03:00 PM 28/04/2001 +0200, Martin Maechler wrote:
> >>>>> "John" == John Fox <jfox at mcmaster.ca> writes:
>
> John> I've prepared preliminary versions of two packages that I plan
> John> eventually to contribute to CRAN:
>
> John> car (for "Companion to Applied Regression") is a package that
> John> provides a variety of functions in support of linear and
> John> generalized linear models, including regression diagnostics
> John> (e.g., studentized residuals, hat-values, Cook's distances,
> John> dfbeta, dfbetas,
>
>the above are all already in standard R!
>Did you look at ?influence.measures and the functions
>mentioned on that help page?
>
>I believe these are all correct for glm objects (which inherit from "lm"),
>as well. Otherwise, we'd rather like to see bug reports!
Dear Martin,
I was aware of these functions (and indeed use a slightly reworked version
of lm.influence to do the basic computations).
The hat-values from influence.measures() in the base package are correct
for glm's, but there is no hatvalues function. (There is a hat function
that takes a model-matrix as its argument.) The dfbetas function in the
base package is correct for glm's; there is no dfbeta function, although
the values are available from lm.influence. The point of adding hatvalues
and dfbeta is primarily to attach case names to the values.
The rstudent function in the base package isn't quite right for glm's; I
provide a generic function with methods for lm and glm objects; likewise
for Cook's D.
As a general matter, it's not hard to get much of what's in the car package
from functions in base R (although some of what's provided is more
ambitious). The point was to make some of these things more convenient,
which I hope will encourage their use, particularly by (my) students.
Regards,
John
________________________________
John Fox
Department of Sociology
McMaster University
email: jfox at McMaster.ca
web: www.socsci.mcmaster.ca/jfox
________________________________
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list