check {MDMA}R Documentation

Check model for influential cases

Description

Perform checks for a linear model regarding influential cases and collinearity numerically and graphically.

[Stable]

Usage

check(object, ...)

Arguments

object

object of class lm.

...

other parameters (none are used at the moment).

Value

check returns a list containing two matrices with statistics regarding influential cases and a vector of variance inflation factors. Furthermore, it produces diagnostics plots.
The return list contains three elements:

- influence, a data.frame, with observations in the model, and the following variables:

predicted.value

The value predicted by the model.

residual

The raw residual.

std.residual

The standardized residual.

dfb.<...>

DFBETAs for the variables in the model.

dffit

DFFIT value.

cov.r

Covariance ratio, a measure of change in the determinant of the coefficient covariance matrix.

cook.d

Cook's distance.

hat

Hat values.

influential

Determines whether a case is influential on any of the measures dfb.<...>, dffit, cov.r, cook.d or hat. See influential cases for more information.



- is.infl is a data.frame indicating which influence measure(s) is/are flagged per observation.

- vifs, a vector containing variance inflation factors for the variables in the model.

By default, the two data.frames regarding influence measures only give the influence measures for cases that are flagged as being influential. Influence measures for all cases can be queried using print.check.lm.

The generated plots are the plots produced by plot.lm, numbers 1 through 6.

influential cases

For the influence indicators, the following rules are applied to check whether a case is influential:

These indicators for being an influential case were derived from influence.measures in the stats package.

Author(s)

Mathijs Deen

Examples

lm.1 <- lm(mpg ~ disp + wt, data = mtcars)
check(lm.1)

[Package MDMA version 1.1.0 Index]