Learn R Programming

MKLE (version 1.0.1)

klik: Kernel log likelihood

Description

The function computes the kernel log likelihood for a given \(\hat \theta \).

Usage

klik(delta , data, kde, grid, min)

Value

The log likelihood based on the shifted kernel density estimator.

Arguments

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.

Author

Thomas Jaki

Details

This function is intended to be called through the function mkle and is optimized for fast computation.

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

mkle

Examples

Run this code
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)

Run the code above in your browser using DataLab