Learn R Programming

modeest (version 2.4.0)

hrm: Bickel's half-range mode estimator

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

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.

Value

A numeric value is returned, the mode estimate.

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.

References

  • Bickel D.R. (2002). Robust estimators of the mode and skewness of continuous data. Computational Statistics and Data Analysis, 39:153-163.

  • Hedges S.B. and Shah P. (2003). Comparison of mode estimation methods and application in molecular clock analysis. BMC Bioinformatics, 4:31-41.

  • Bickel D.R. and Fruehwirth R. (2006). On a Fast, Robust Estimator of the Mode: Comparisons to Other Robust Estimators with Applications. Computational Statistics and Data Analysis, 50(12):3500-3530.

See Also

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

Examples

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab