mde.vonmises {wle} | R Documentation |
Computes the minimum distance estimates for the parameters of a von Mises distribution: the mean direction and the concentration parameter.
mde.vonmises(x, bw, mu = NULL, kappa = NULL, n = 512, from = circular(0), to = circular(2 * pi), lower = NULL, upper = NULL, method = "L-BFGS-B", lower.kappa = .Machine$double.eps, upper.kappa = Inf, alpha = NULL, p = 2, control.circular = list(), ...) ## S3 method for class 'mde.vonmises': print(x, digits = max(3, getOption("digits") - 3), ...)
x |
a vector. The object is coerced to class circular . |
bw |
the value of the smoothing parameter. |
mu |
initial value for the mean direction. Default: maximum likelihood estimate. |
kappa |
initial value for the concentration parameter. Default: maximum likelihood estimate. |
n |
number of points used to approximate the density. |
from |
from which point in the circle the density is approximate. |
to |
to which point in the circle the density is approximate. |
lower |
a 2 elements vector passed to optim used to constrained optimization. First element for the mean direction, second element for the concentration. |
upper |
a 2 elements vector passed to optim used to constrained optimization. First element for the mean direction, second element for the concentration. |
method |
passed to optim . |
lower.kappa |
if lower is NULL this parameter is used to constrained optimization for the concentration parameter. |
upper.kappa |
if upper is NULL this parameter is used to constrained optimization for the concentration parameter. |
alpha |
see the next argument p . This is a different
parameterization, alpha=-1/2 provides Hellinger distance,
alpha=-1 provides Kullback-Leibler distance and alpha=-2
provides Neyman's Chi-Square distance. |
p |
p=2 provides Hellinger distance, p=-1
provides Kullback-Leibler distance and p=Inf provides Neyman's
Chi-Square distance. It is ignored if alpha is not NULL . |
control.circular |
the attribute of the resulting object (mu ) |
digits |
integer indicating the precision to be used. |
... |
further parameters in print.mde.vonmises . |
The distance from an estimated density (by the non parametric kernel density estimator) and the model is evaluated by simple rectangular approximation. optim
is used to performs minimization.
Returns a list with the following components:
call |
the match.call(). |
mu |
the estimate of the mean direction. |
kappa |
the estimate of the concentration parameter. |
dist |
the distance between the estimated density and the model. |
data |
the original supplied data converted in radians, clockwise and zero at 0. |
x |
the 'n' coordinates of the points where the density is estimated. |
y |
the estimated density values. |
k |
the density at the model. |
Claudio Agostinelli
C. Agostinelli (2006) Robust Estimation for Circular Data, under revision.
circular
, mle.vonmises
and wle.vonmises
.
if (require(circular)) { set.seed(1234) x <- c(rvonmises(n=200, mu=circular(0), kappa=10), rvonmises(n=20, mu=circular(pi/2), kappa=20)) res <- mde.vonmises(x, bw=500, mu=circular(0), kappa=10) res plot(circular(0), type='n', xlim=c(-1, 1.75), shrink=1.2) lines(circular(res$x), res$y) lines(circular(res$x), res$k, col=2) legend(1,1.5, legend=c('estimated density', 'MDE'), lty=c(1, 1), col=c(1, 2)) } else { cat("Please, install the package 'circular' in order to use this function.\n") }