klik | R Documentation |
The function computes the kernel log likelihood for a given \hat \theta
.
klik(delta , data, kde, grid, min)
delta |
the difference of the parameter theta for which the kernel log likelihood will be computed and the sample mean. |
data |
the data for which the kernel log likelihood will be computed. |
kde |
an object of the class "density". |
grid |
the stepsize between the x-values in kde. |
min |
the smallest x-value in kde. |
This function is intended to be called through the function mkle
and is optimized for fast computation.
The log likelihood based on the shifted kernel density estimator.
Thomas Jaki
Jaki T., West R. W. (2008) Maximum kernel likelihood estimation. Journal of Computational and Graphical Statistics Vol. 17(No 4), 976-993.
mkle
data(state)
attach(state)
bw<-2*sd(CRIME)
kdensity<-density(CRIME,bw=bw,kernel="biweight",
from=min(CRIME)-2*bw,to=max(CRIME)+2*bw,n=2^12)
min<-kdensity$x[1]
grid<-kdensity$x[2]-min
# finds the kernel log likelihood at the sample mean
klik(0,CRIME, kdensity, grid, min)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.