mkle {MKLE}R Documentation

Maximum kernel likelihood estimation

Description

Computes the maximum kernel likelihood estimator for a given dataset and bandwidth.

Usage

mkle(data,bw=2*sd(data),kernel=c("gaussian", "epanechnikov", "rectangular", "triangular", 
     "biweight", "cosine", "optcosine"),gridsize=2^14)

Arguments

data

the data for which the estimator should be found.

bw

the smoothing bandwidth to be used.

kernel

a character string giving the smoothing kernel to be used. This must be one of '"gaussian"', '"rectangular"', '"triangular"', '"epanechnikov"', '"biweight"', '"cosine"' or '"optcosine"', with default '"gaussian"'. May be abbreviated to a unique prefix (single letter).

gridsize

the number of points at which the kernel density estimator is to be evaluated with 2^{14} as the default.

Details

The default for the bandwidth is 2s, which is the near-optimal value if a Gaussian kernel is used. If the bandwidth is zero, the sample mean will be returned.

Larger gridsize results in more acurate estimates but also longer computation times. The use of gridsizes between 2^{11} and 2^{20} is recommended.

Value

The maximum kernel likelihood estimator.

Note

optimize is used for the optimization and density is used to estimate the kernel density.

Author(s)

Thomas Jaki

References

Jaki T., West R. W. (2008) Maximum kernel likelihood estimation. Journal of Computational and Graphical Statistics Vol. 17(No 4), 976-993.

See Also

klik

Examples

data(state)
plot(density(state$CRIME))
abline(v=mean(state$CRIME),col='red')
abline(v=mkle(state$CRIME),col='blue')

[Package MKLE version 1.0.1 Index]