MKLE {MKLE}R Documentation

Maximum kernel likelihood estimation

Description

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

Usage

mkle(data, Kernel = dnorm, bw = 2*sd(data), small = TRUE)

Arguments

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.
small logical; if 'TRUE', only the value of the estimator is returned. Otherwise the full optimization history will be included.

Details

The underlying shifted kernel density estimator is defined as

1/(nh)sum K((y-X_i-bar X+theta)/h).

The default for the bandwidth is 2*sigma, which is the optimal value if a Gaussian kernel is used.

Value

The MKLE or a list with components:

par The best set of parameters found.
value The value of klik corresponding to par.
counts A two-element integer vector giving the number of calls to Klik. This excludes those calls needed to compute the Hessian, if requested, and any calls to fn to compute a finite-difference approximation to the gradient.
convergence An integer code. '0' indicates successful convergence. Error codes are
'1' indicates that the iteration limit 'maxit' had been reached.
'10' indicates degeneracy of the Nelder-Mead simplex.
'51' indicates a warning from the '"L-BFGS-B"' method; see component 'message' for further details.
'52' indicates an error from the '"L-BFGS-B"' method; see component 'message' for further details.
message A character string giving any additional information returned by the optimizer, or 'NULL'.

Note

The optim with the method 'BFGS' is used for the optimization.

Author(s)

Thomas Jaki

References

~not yet~

See Also

optim and klik

Examples


data(state)
attach(state)

mkle(crime)


[Package MKLE version 0.02 Index]