[R] How is the line in av.plot calculated?
Chuck Cleland
ccleland at optonline.net
Fri Feb 16 19:20:22 CET 2007
Tom La Bone wrote:
> I suspect that the line in the added variable plot (library car) is a SLR of
> the residuals, but I can't seem to find this written anywhere. Can someone
> confirm this? Thanks.
See the Fox(1997) reference on the help page (pages 281-283). Note
that both the x-axis and the y-axis are residuals. For example, you
could do the av.plot for income in the Duncan data as follows:
library(car)
res1 <- residuals(lm(prestige ~ education+type, data=Duncan))
res2 <- residuals(lm(income ~ education+type, data=Duncan))
plot(res2, res1)
abline(lm(res1 ~ res2))
> Tom
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894
More information about the R-help
mailing list