Learn R Programming

modeest (version 2.1)

parzen: Parzen's Kernel Mode Estimator

Description

Parzen's kernel mode estimator is the value maximizing the kernel density estimate.

Usage

parzen(x, 
         bw = NULL, 
         kernel = "gaussian", 
         abc = FALSE, 
         par = shorth(x), 
         optim.method = "BFGS", 
         ...)

Arguments

x

numeric. Vector of observations.

bw

numeric. The smoothing bandwidth to be used.

kernel

character. The kernel to be used. Available kernels are "biweight", "cosine", "eddy", "epanechnikov", "gaussian", "optcosine", "rectangular", "triangular", "uniform". See density.default for more details on some of these kernels.

abc

logical. If FALSE (the default), the kernel density estimate is maximised using optim.

par

numeric. The initial value used in optim.

optim.method

character. If abc = FALSE, the method used in optim.

if abc = FALSE, further arguments to be passed to optim.

Value

parzen returns a numeric value, the mode estimate. If abc = TRUE, the x value maximizing the density estimate is returned. Otherwise, the optim method is used to perform maximization, and the attributes: 'value', 'counts', 'convergence' and 'message', coming from the optim method, are added to the result.

Details

If kernel = "uniform", the naive mode estimate is returned.

References

  • Parzen E. (1962). On estimation of a probability density function and mode. Ann. Math. Stat., 33(3):1065--1076.

  • Konakov V.D. (1973). On the asymptotic normality of the mode of multidimensional distributions. Theory Probab. Appl., 18:794-803.

  • Eddy W.F. (1980). Optimum kernel estimators of the mode. Ann. Statist., 8(4):870-882.

  • Eddy W.F. (1982). The Asymptotic Distributions of Kernel Estimators of the Mode. Z. Wahrsch. Verw. Gebiete, 59:279-290.

  • Romano J.P. (1988). On weak convergence and optimality of kernel density estimates of the mode. Ann. Statist., 16(2):629-647.

  • Abraham C., Biau G. and Cadre B. (2003). Simple Estimation of the Mode of a Multivariate Density. Canad. J. Statist., 31(1):23-34.

  • Abraham C., Biau G. and Cadre B. (2004). On the Asymptotic Properties of a Simple Estimate of the Mode. ESAIM Probab. Stat., 8:1-11.

See Also

mlv, naive

Examples

Run this code
# NOT RUN {
# Unimodal distribution
x <- rlnorm(10000, meanlog = 3.4, sdlog = 0.2)

## True mode
lnormMode(meanlog = 3.4, sdlog = 0.2)

## Estimate of the mode
M <- mlv(x, method = "kernel", kernel = "gaussian", bw = 0.3, par = shorth(x))
print(M)
plot(M)
# }

Run the code above in your browser using DataLab