mlm.influence {mvinfluence} | R Documentation |
Calculate Regression Deletion Diagnostics for Multivariate Linear Models
Description
mlm.influence
is the main computational function in this package. It
is usually not called directly, but rather via its alias,
influence.mlm
, the S3 method for a mlm
object.
Usage
mlm.influence(model, do.coef = TRUE, m = 1, ...)
Arguments
model |
An |
do.coef |
logical. Should the coefficients be returned in the
|
m |
Size of the subsets for deletion diagnostics |
... |
Further arguments passed to other methods |
Details
The computations and methods for the m=1
case are straight-forward,
as are the computations for the m>1
case. Associated methods for
m>1
are still under development.
Value
mlm.influence
returns an S3 object of class inflmlm
, a
list with the following components:
m |
Deletion subset size |
H |
Hat values, |
Q |
Residuals, |
CookD |
Cook's distance values |
L |
Leverage components |
R |
Residual components |
subsets |
Indices of the subsets |
CookD |
Cook's distance values |
L |
Leverage components |
R |
Residual components |
subsets |
Indices of the observations in the subsets of size |
labels |
Observation labels |
call |
Model call for the |
Beta |
Deletion regression coefficients– included if |
Author(s)
Michael Friendly
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.
Barrett, B. E. (2003). Understanding Influence in Multivariate Regression. Communications in Statistics – Theory and Methods, 32, 3, 667-680.
See Also
Examples
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)
Rohwer.mod
influence(Rohwer.mod)
# extract the most influential cases
influence(Rohwer.mod) |>
as.data.frame() |>
dplyr::arrange(dplyr::desc(CookD)) |>
head()
# Sake data
Sake.mod <- lm(cbind(taste,smell) ~ ., data=Sake)
influence(Sake.mod) |>
as.data.frame() |>
dplyr::arrange(dplyr::desc(CookD)) |> head()