grenander function

The Grenander mode estimator

The Grenander mode estimator

This function computes the Grenander mode estimator.

grenander(x, bw = NULL, k, p, ...)

Arguments

  • x: numeric. Vector of observations.
  • bw: numeric. The bandwidth to be used. Should belong to (0, 1].
  • k: numeric. Paramater 'k' in Grenander's mode estimate, see below.
  • p: numeric. Paramater 'p' in Grenander's mode estimate, see below. If p = Inf, the function venter is used.
  • ...: Additional arguments to be passed to venter.

Returns

A numeric value is returned, the mode estimate. If p = Inf, the venter mode estimator is returned.

Details

The Grenander estimate is defined by

j=1nk(xj+k+xj)2(xj+kxj)pj=1nk1(xj+kxj)p(sumj=1nk(xj+k+xj)/(2(xj+kxj)p))/(sumj=1nk1/((xj+kxj)p)) \frac{ \sum_{j=1}^{n-k} \frac{(x_{j+k} + x_{j})}{2(x_{j+k} - x_{j})^p} }{ \sum_{j=1}^{n-k} \frac{1}{(x_{j+k} - x_{j})^p} }( sum_{j=1}^{n-k} (x_{j+k} + x_{j})/(2(x_{j+k} - x_{j})^p) ) / ( sum_{j=1}^{n-k} 1/((x_{j+k} - x_{j})^p) )

If pp tends to infinity, this estimate tends to the Venter mode estimate; this justifies to call venter if p = Inf.

The user should either give the bandwidth bw or the argument k, k being taken equal to ceiling(bw*n) - 1 if missing.

Note

The user may call grenander through mlv(x, method = "grenander", bw, k, p, ...).

Examples

# Unimodal distribution x <- rnorm(1000, mean = 23, sd = 0.5) ## True mode normMode(mean = 23, sd = 0.5) # (!) ## Parameter 'k' k <- 5 ## Many values of parameter 'p' ps <- seq(0.1, 4, 0.01) ## Estimate of the mode with these parameters M <- sapply(ps, function(p) grenander(x, p = p, k = k)) ## Distribution obtained plot(density(M), xlim = c(22.5, 23.5))

References

  • Grenander U. (1965). Some direct estimates of the mode. Ann. Math. Statist., 36 :131-138.
  • Dalenius T. (1965). The Mode - A Negleted Statistical Parameter. J. Royal Statist. Soc. A, 128:110-117.
  • Adriano K.N., Gentle J.E. and Sposito V.A. (1977). On the asymptotic bias of Grenander's mode estimator. Commun. Statist.-Theor. Meth. A, 6 :773-776.
  • Hall P. (1982). Asymptotic Theory of Grenander's Mode Estimator. Z. Wahrsch. Verw. Gebiete, 60 :315-334.

See Also

mlv for general mode estimation; venter for the Venter mode estimate.

Author(s)

D.R. Bickel for the original code, P. Poncet for the slight modifications introduced.

  • Maintainer: Paul Poncet
  • License: GPL-3
  • Last published: 2019-11-18