Klik {MKLE}R Documentation

Kernel log likelihood

Description

The function computes the kernel log likelihood for a given theta

Usage

klik(theta = 0, data, Kernel = dnorm, bw = 2*sd(data))

Arguments

theta the parameter value for which the log likelihood will be computed.
data the data for which the log likelihood will be computed.
Kernel a R function to be used as the kernel function.
bw the smoothing bandwidth to be used.

Details

The log likelihood of theta for a given bandwidth.

Value

The log likelihood based on the shifted kernel density estimator.

Author(s)

Thomas Jaki

References

~in preperation~

See Also

Kdensity and mkle

Examples


## plots the kernel log likelihood
data(state)
attach(state)
tv<-seq(min(crime),max(crime))

lik<-sapply(tv,klik,data=crime) 
plot(tv,lik,type='l',xlab='theta',ylab='Kernel Likelihood')
abline(v=mean(crime),col='red')

[Package MKLE version 0.02 Index]