hrm: Bickel's half-range mode estimator

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/hrm.R

Description

SINCE THIS FUNCTION USED TO DEPEND ON THE BIOCONDUCTOR PACKAGE 'GENEFILTER', IT IS CURRENTLY DEFUNCT.

This function computes Bickel's half range mode estimator described in Bickel (2002). It is a wrapper around the function half.range.mode from package genefilter.

Usage

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

Arguments

x

numeric. Vector of observations.

bw

numeric. The bandwidth to be used. Should belong to (0, 1]. This gives the fraction of the observations to consider at each step of the iterative algorithm.

...

Additional arguments.

Details

The mode estimator is computed by iteratively identifying densest half ranges. A densest half range is an interval whose width equals half the current range, and which contains the maximal number of observations. The subset of observations falling in the selected densest half range is then used to compute a new range, and the procedure is iterated.

Value

A numeric value is returned, the mode estimate.

Note

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

Author(s)

The C and R code are due to Richard Bourgon bourgon@stat.berkeley.edu, see package genefilter. The algorithm is described in Bickel (2002).

References

See Also

mlv() for general mode estimation; hsm() for the half sample mode; venter() for the Venter mode estimate.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Unimodal distribution 
x <- rgamma(1000, shape = 31.9)
## True mode
gammaMode(shape = 31.9)

## Estimate of the mode
hrm(x, bw = 0.4)
mlv(x, method = "hrm", bw = 0.4)

## End(Not run)

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