pubh (version 1.3.2)

rank_leverage: Ranks observations by leverage.

Description

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

Usage

rank_leverage(x)

Value

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

Arguments

x

A numeric variable. Missing values are removed by default.

See Also

jack_knife.

Examples

Run this code
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