asselin: The Asselin de Beauville mode estimator

Description Usage Arguments Value Note References See Also Examples

View source: R/asselin.R

Description

This mode estimator is based on the algorithm described in Asselin de Beauville (1978).

Usage

1
asselin(x, bw = NULL, ...)

Arguments

x

numeric. Vector of observations.

bw

numeric. A number in (0, 1]. If bw = 1, the selected 'modal chain' may be too long.

...

further arguments to be passed to the quantile function.

Value

A numeric value is returned, the mode estimate.

Note

The user may call asselin through mlv(x, method = "asselin", ...).

References

See Also

mlv for general mode estimation.

Examples

1
2
3
4
5
6
7
8
9
x <- rbeta(1000, shape1 = 2, shape2 = 5)

## True mode:
betaMode(shape1 = 2, shape2 = 5)

## Estimation:
asselin(x, bw = 1)
asselin(x, bw = 1/2)
mlv(x, method = "asselin")

modeest documentation built on Nov. 18, 2019, 5:07 p.m.