bw.AA {NPCirc}R Documentation

Direct and solve-the-equation plug-in rule

Description

Smoothing selectors for the circular kernel density (and its derivatives) estimator. This function implements the l-stage solve-the-equation and direct plug-in smoothing selector.

Usage

bw.AA(x,deriv.order=0,method = c("ste","dpi"),nstage=2,kernel="vonmises",M=NULL,
      commonkappa=TRUE,Q1=NULL,Q2=NULL,lower=NULL,upper=NULL,tol=NULL,
      approximate=NULL)

Arguments

x

Data from which the smoothing parameter is to be computed. The object is coerced to class circular.

deriv.order

Derivative order. Default deriv.order=0 (density estimation).

method

Either "ste" (solve-the-equation) or "dpi" (direct plug-in). Can be abbreviated.

nstage

Number of stages in the plug-in smoothing parameter. Default nstage=2.

kernel

A character string giving the smoothing kernel to be used. This must be one of vonmises or wrappednormal. Default kernel=vonmises.

M

Integer indicating the number of components in the von Mises mixture at stage 0. If M is a vector, AIC will be used, to select the number of components between the indicated values of M. Default, M=1 if method "ste", M=1:5 if method "dpi".

commonkappa

Logical; if TRUE, at stage 0, all the components in the von Mises mixture have the same concentration. Default, commonkappa=T.

Q1

Vector of constants related to the kernel to derive the explicit expression of the optimal smoothing parameters of the density functionals. Its value is provided by default when using the "vonmises" or "wrappednormal" as kernel.

Q2

Constant related to the kernel to derive the explicit expression of the optimal smoothing parameters of the density derivative. Its value is provided by default when using the "vonmises" or "wrappednormal" as kernel.

lower, upper

For method "ste", the range over which the bandwidth h is searched. Default, lower=10^(-3) and upper=pi^2/3 if kernel="vonmises"; lower=10^(-10) and upper=0.5, otherwise.

tol

For method "ste", the convergence tolerance for searching the smoothing parameter with uniroot. Default, tol=.Machine$double.eps^0.25.

approximate

For method "dpi", logical, if TRUE, the explicit expressions (relying on asymptotics) for the optimal smoothing parameters are employed. If FALSE, an optimization routine is employed, searching for the smoothing parameter minimizing the asymptotic mean squared error of the density derivatives and functionals. Default, approximate=T.

Details

By default, this function computes the solve-the-equation plug-in rule for circular kernel density estimation. If method="dpi", this function computes the direct plug-in rule.

At stage 0, a mixture of von Mises is employed for computing the rule of thumb. The reason for employing a mixture model is that the von Mises estimates a uniform density when the true density model is k-fold rotational symmetric. Thus, in that case, the density functional estimator would be close to zero.

The number of components in the mixture is controlled with M. By default, a von Mises density (M=1) is employed in method="ste". For method="dpi", by default, the number of components in the mixture is selected using the Akaike Information Criterion, by comparing a mixture of 1 to 5 components. For simplicity, by default, the same concentration parameter is employed in all the components. This may be changed by setting commonkappa=F.

For method="ste", the minimum number of stages is two (nstage=2). Otherwise, the solve-the-equation rule cannot be computed. A rule of thumb can be computed with method="dpi" and nstage=0.

Value

Value of the smoothing parameter (mean resultant length). When the kernel is vonmises the bandwidth is equal to the concentration parameter.

Author(s)

Jose Ameijeiras-Alonso.

References

Ameijeiras-Alonso, J. (2022). A reliable data-based smoothing parameter selection method for circular kernel estimation.

See Also

density.circular, kern.den.circ, bw.pi, bw.rt, bw.CV, bw.boot

Examples

set.seed(2022)
n <- 50
x <- rcircmix(n,model=6)
# Concentration parameter for density estimation
bw.AA(x) # Solve-the-equation concentration parameter
bw.AA(x, method="dpi") # Direct plug-in concentration parameter
# Concentration parameter for the density derivative estimate
bw.AA(x, method="ste") # Solve-the-equation concentration parameter
bw.AA(x, deriv.order=1, method="dpi") # Direct plug-in concentration parameter

[Package NPCirc version 3.1.1 Index]