Learn R Programming

mvinfluence (version 0.9.0)

hatvalues.mlm: Hatvalues 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
hatvalues(model, m = 1, infl, ...)

Value

A vector of hatvalues

Arguments

model

An object of class mlm, as returned by lm

m

The size of subsets to be considered

infl

An inflmlm object, as returned by mlm.influence

...

Other arguments, for compatibility with the generic; ignored.

Details

Hat values are a component of influence diagnostics, measuring the leverage or outlyingness of observations in the space of the predictor variables.

The usual case considers observations one at a time (m=1), where the hatvalue is proportional to the squared Mahalanobis distance, \(D^2\) of each observation from the centroid of all observations. This function extends that definition to calculate a comparable quantity for subsets 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.

See Also

cooks.distance.mlm

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)

options(digits=3)
hatvalues(Rohwer.mod)
cooks.distance(Rohwer.mod)

Run the code above in your browser using DataLab