bw.pi {NPCirc} | R Documentation |
Plug–in rule
Description
This function implements the von Mises scale plug-in rule for the smoothing parameter for density estimation when the number of components in the mixture is selected by Akaike Information Criterion (AIC) which selects the best model between a mixture of 2-5 von Mises distributions.
Usage
bw.pi(x, M=NULL, lower=0, upper=100, np=500, tol=0.1, outM=FALSE)
Arguments
x |
Data from which the smoothing parameter is to be computed. The object is coerced to class |
M |
Integer indicating the number of components in the mixture. If |
lower , upper |
|
np |
Number of points where to evaluate the estimator for numerical integration. Default |
tol |
Convergence tolerance for |
outM |
Logical; if |
Details
The value of the smoothing parameter is chosen by minimizing the asymptotic mean integrated squared error (AMISE) derived by Di Marzio et al. (2009)
assuming that the data follow a mixture of von Mises distributions. The number of components in the mixture can be fixed by the user, by specifying
the argument M
or selected by using AIC (default option) as described in Oliveira et al. (2012).
The NAs will be automatically removed.
Value
Vector with the value of the smoothing parameter and the number of components in the mixture (if specified).
Author(s)
Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal
References
Oliveira, M., Crujeiras, R.M. and Rodriguez–Casal, A. (2012) A plug–in rule for bandwidth selection in circular density. Computational Statistics and Data Analysis, 56, 3898–3908.
Oliveira, M., Crujeiras R.M. and Rodriguez–Casal, A. (2014) NPCirc: an R package for nonparametric circular methods. Journal of Statistical Software, 61(9), 1–26. https://www.jstatsoft.org/v61/i09/
See Also
kern.den.circ
, bw.rt
, bw.CV
, bw.boot
Examples
set.seed(2012)
n <- 100
x <- rcircmix(n,model=18)
bw.pi(x, M=3)
bw.pi(x, outM=TRUE) # Using AIC