Learn R Programming

mvinfluence (version 0.9.0)

cooks.distance.mlm: Cook's distance for a MLM

Description

The functions cooks.distance.mlm and hatvalues.mlm are designed as extractor functions for regression deletion diagnostics for multivariate linear models following Barrett & Ling (1992). These are close analogs of methods for univariate and generalized linear models handled by the influence.measures in the stats package.

Usage

# S3 method for mlm
cooks.distance(model, infl = mlm.influence(model, do.coef = FALSE), ...)

Value

A vector of Cook's distances

Arguments

model

A mlm object, fit by lm()

infl

A inflmlm object. The default simply runs mlm.influence() on the model, suppressing coefficients.

...

Ignored

Details

In addition, the functions provide diagnostics for deletion of subsets of observations of size m>1.

References

Barrett, B. E. and Ling, R. F. (1992). General Classes of Influence Measures for Multivariate Regression. Journal of the American Statistical Association, 87(417), 184-191.

Examples

Run this code

data(Rohwer, package="heplots")
Rohwer2 <- subset(Rohwer, subset=group==2)
rownames(Rohwer2)<- 1:nrow(Rohwer2)
Rohwer.mod <- lm(cbind(SAT, PPVT, Raven) ~ n+s+ns+na+ss, data=Rohwer2)

hatvalues(Rohwer.mod)
cooks.distance(Rohwer.mod)

Run the code above in your browser using DataLab