influence.measures(model) ## S3 method for class 'infl': print(x, digits = max(3, getOption("digits") - 4), ...) ## S3 method for class 'infl': summary(object, digits = max(2, getOption("digits") - 5), ...)hatvalues(model, ...) ## S3 method for class 'lm': hatvalues(model, infl = lm.influence(model, do.coef = FALSE), ...)
rstandard(model, ...) ## S3 method for class 'lm': rstandard(model, infl = lm.influence(model, do.coef = FALSE), sd = sqrt(deviance(model)/df.residual(model)), ...) ## S3 method for class 'glm': rstandard(model, infl = influence(model, do.coef = FALSE), type = c("deviance", "pearson"), ...)
rstudent(model, ...) ## S3 method for class 'lm': rstudent(model, infl = lm.influence(model, do.coef = FALSE), res = infl$wt.res, ...) ## S3 method for class 'glm': rstudent(model, infl = influence(model, do.coef = FALSE), ...)
dfbeta(model, ...) ## S3 method for class 'lm': dfbeta(model, infl = lm.influence(model, do.coef = TRUE), ...)
dfbetas(model, ...) ## S3 method for class 'lm': dfbetas(model, infl = lm.influence(model, do.coef = TRUE), ...)
dffits(model, infl = lm.influence(model, do.coef = FALSE), res = weighted.residuals(model))
covratio(model, infl = lm.influence(model, do.coef = FALSE), res = weighted.residuals(model))
cooks.distance(model, ...) ## S3 method for class 'lm': cooks.distance(model, infl = lm.influence(model, do.coef = FALSE), res = weighted.residuals(model), sd = sqrt(deviance(model)/df.residual(model)), hat = infl$hat, ...) ## S3 method for class 'glm': cooks.distance(model, infl = influence(model, do.coef = FALSE), res = infl$pear.res, dispersion = summary(model)$dispersion, hat = infl$hat, ...)
model | a linear model or generalized linear model representing fit. Normally, it is an object of class (or inherited from) "lm" or "glm", returned by function lm or glm. |
x, object | an object of class "infl", returned by the function influence.measures normally. |
digits | the number of significant digits to print. |
infl | an influence structure returned by lm.influence or influence. |
sd | standard deviation to use in the calculations. |
res | residual to use in the calculations. |
hat | the hat values to use in the calculations. |
dispersion | the dispersion values to use in the calculations. |
... | other arguments pass to the functions. |
influence.measures | returns an object of
class "infl", which contains the following components:
| ||||||
hatvalues | returns the diagonal values of the hat matrix for model. Its method hatvalues.lm extracts the hat value from an infl structure, which is generated by the lm.influence function. | ||||||
rstandard | generic. Methods rstandard.lm and rstandard.glm return the standardized residuals for linear and generalized linear models, respectively. | ||||||
rstudent | generic. Methods rstudent.lm and rstudent.glm return the studentized residuals for linear and generalized linear models, respectively. | ||||||
dfbeta | returns a matrix containing the differences in regression coefficients. (The i-th row shows the change in coefficients from omitting the i-th observation from the model.) | ||||||
dfbetas | returns a standardized version of dfbeta. | ||||||
dffits | returns the standardized change in fitted values from omitting the i-th observation from the model. | ||||||
covratio | returns a measure of the change in the covariance of the coefficients from omitting the i-th observation from the model. | ||||||
cooks.distance | returns the cooks distance for the model. |
numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16) ldose <- rep(0:5, 2) sex <- factor(rep(c("M", "F"), c(6, 6))) SF <- cbind(numdead, numalive = 20 - numdead) bwormGlm <- glm(SF ~ ldose + sex + ldose:sex, family = binomial) summary(bwormGlm) infl <- influence.measures(bwormGlm) print(infl) summary(infl)hatvalues(bwormGlm) rstandard(bwormGlm) rstudent(bwormGlm) dfbeta(bwormGlm) dfbetas(bwormGlm) dffits(bwormGlm) covratio(bwormGlm) cooks.distance(bwormGlm)