Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/mde.wrappednormal.R
Computes the minimum distance estimates for the parameters of a Wrapped Normal distribution: the mean direction and the concentration parameter (and the scale parameter).
1 2 3 4 5 6 7 | 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(), ...)
## S3 method for class 'mde.wrappednormal'
print(x, digits = max(3, getOption("digits") - 3), ...)
|
x |
a vector. The object is coerced to class |
bw |
the value of the smoothing parameter. |
mu |
initial value for the mean direction. Default: maximum likelihood estimate. |
rho |
initial value for the concentration parameter. Default: maximum likelihood estimate. |
sd |
initial value for the standard deviation parameter. This value is used only if |
alpha |
if not |
p |
|
tol |
the absolute accuracy to be used to achieve convergence of the algorithm. This argument is passed to the function which determined the Maximum Likelihood estimates of the parameters. See |
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 |
upper |
a 2 elements vector passed to |
method |
passed to |
lower.rho |
if |
upper.rho |
if |
min.sd |
minimum value for the |
K |
number of elements used to approximate the density of the wrapped normal. |
min.k |
minimum number of elements used to approximate the density of the wrapped normal. |
control.circular |
the attribute of the resulting object ( |
digits |
integer indicating the precision to be used. |
... |
further parameters in |
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. |
rho |
the estimate of the concentration parameter. |
sd |
the estimate of the standard deviation 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. Robust estimation for circular data. Computational Statistics & Data Analysis, 51(12):5867-5875, 2007.
circular
, mle.wrappednormal
and wle.wrappednormal
.
1 2 3 4 5 6 7 8 9 | 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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.