mkle | R Documentation |
Computes the maximum kernel likelihood estimator for a given dataset and bandwidth.
mkle(data,bw=2*sd(data),kernel=c("gaussian", "epanechnikov", "rectangular", "triangular",
"biweight", "cosine", "optcosine"),gridsize=2^14)
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 |
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.
The maximum kernel likelihood estimator.
optimize
is used for the optimization and density
is used to estimate the kernel density.
Thomas Jaki
Jaki T., West R. W. (2008) Maximum kernel likelihood estimation. Journal of Computational and Graphical Statistics Vol. 17(No 4), 976-993.
klik
data(state)
plot(density(state$CRIME))
abline(v=mean(state$CRIME),col='red')
abline(v=mkle(state$CRIME),col='blue')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.