Learn R Programming

olsrr (version 0.4.0)

ols_leverage: Leverage

Description

The leverage of an observation is based on how much the observation's value on the predictor variable differs from the mean of the predictor variable. The greater an observation's leverage, the more potential it has to be an influential observation.

Usage

ols_leverage(model)

Arguments

model

an object of class lm

Value

leverage

References

Kutner, MH, Nachtscheim CJ, Neter J and Li W., 2004, Applied Linear Statistical Models (5th edition). Chicago, IL., McGraw Hill/Irwin.

Examples

Run this code
# NOT RUN {
model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars)
ols_leverage(model)
# }

Run the code above in your browser using DataLab