dmode: Mode from density estimation

Description Usage Arguments Examples

Description

Finds the mode using the density function and then obtains the maximum value.

Usage

1
dmode(x, adjust = 1.5)

Arguments

x

Value vector. Numeric or integers.

adjust

Bandwidth adjustment. See density.

Examples

1
2
3
4
5
x <- rchisq(1000, 3)
hist(x, br=50)
abline(v = dmode(x), col = "red")
abline(v = median(x), col = "green")
abline(v = mean(x), col = "blue")

ggdistribute documentation built on May 2, 2019, 10:25 a.m.