pubh (version 1.1.16)

rank_leverage: Ranks observations by leverage.

Description

rank_leverage ranks observations by their leverage (influence) on the arithmetic mean.

Usage

rank_leverage(x)

Arguments

x

A numeric variable. Missing values are removed by default.

Value

A data frame ranking observations by their leverage around the mean.

See Also

jack_knife.

Examples

Run this code
# NOT RUN {
x <- rnorm(10, 170, 8)
x
mean(x)
rank_leverage(x)

x <- rnorm(100, 170, 8)
mean(x)
head(rank_leverage(x))
# }

Run the code above in your browser using DataLab