powered by
This extracts the code that provides the major part of the statistical information used by plot.lm, leaving out the code used to provide the graphs
lmdiags(x, which = c(1L:3L, 5L), cook.levels = c(0.5, 1), hii=NULL)
This must be an object of class lm object, or that inherits from an object of class lm.
lm
a subset of the numbers '1:6', indicating the plots for which statistical information is required
Levels for contours of cook.levels, by default c(0.5,1)
cook.levels
c(0.5,1)
Diagonal elements for the hat matrix. If not supplied (hii=NULL), they will be calculated from the argument x.
hii=NULL
x
fitted values
standardized residuals (for glm models standardized deviance residuals)
glm
As yh, but omitting observations with zero weight
yh
Cook's statistics
standardized residuals (for glm models standardized Pearson residuals)
See plot.lm for additional information.
plot.lm
See references for plot.lm
plotSimDiags, plot.lm
plotSimDiags
# NOT RUN { women.lm <- lm(weight ~ height, data=women) veclist <- lmdiags(x=women.lm) ## Returns the statistics that are required for graphs 1, 2, 3, and 5 # }
Run the code above in your browser using DataLab