mkle: Maximum kernel likelihood estimation

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

Description

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

Usage

1
2
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

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

Example output



MKLE documentation built on May 1, 2019, 6:49 p.m.