mde.wrappednormal(x, bw, mu = NULL, rho = NULL, sd = NULL, alpha = NULL, p = 2, tol = 1e-05, n = 512, from = circular(0), to = circular(2 * pi), lower = NULL, upper = NULL, method = "L-BFGS-B", lower.rho = 1e-06, upper.rho = 1 - 1e-06, min.sd = 0.001, K = NULL, min.k = 10, control.circular = list(), ...)
"print"(x, digits = max(3, getOption("digits") - 3), ...)
circular
.rho
is NULL
. Default: maximum likelihood estimate.NULL
overrides the value of p
. 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=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
.mle.wrappednormal
.optim
used to constrained optimization. First element for the mean direction, second element for the concentration.optim
used to constrained optimization. First element for the mean direction, second element for the concentration.optim
.lower
is NULL
this parameter is used to constrained optimization for the concentration parameter.upper
is NULL
this parameter is used to constrained optimization for the concentration parameter.sd
parameter. This argument is passed to the function which determined the Maximum Likelihood estimates of the parameters. See mle.wrappednormal
.mu
)print.mde.wrappednormal
.optim
is used to performs minimization.circular
, mle.wrappednormal
and wle.wrappednormal
.
set.seed(1234)
x <- c(rwrappednormal(n=200, mu=circular(0), sd=0.6),
rwrappednormal(n=20, mu=circular(pi/2), sd=0.1))
res <- mde.wrappednormal(x, bw=0.08, mu=circular(0), sd=0.6)
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))
Run the code above in your browser using DataLab