Computes the rule-of-thumb bandwidth for the polyspherical kernel density estimator using a product of von Mises--Fisher distributions as reference in the Asymptotic Mean Integrated Squared Error (AMISE).
bw_rot_polysph(X, d, kernel = 1, kernel_type = c("prod", "sph")[1],
bw0 = NULL, upscale = FALSE, deriv = 0, k = 10, kappa = NULL, ...)A list with entries bw (optimal bandwidth) and opt,
the latter containing the output of nlm.
a matrix of size c(n, sum(d) + r) with the sample.
vector of size r with dimensions.
kernel employed: 1 for von Mises--Fisher (default);
2 for Epanechnikov; 3 for softplus.
type of kernel employed: 1 for product kernel
(default); 2 for spherically symmetric kernel.
initial bandwidth for minimizing the CV loss. If NULL, it
is computed internally by magnifying the bw_mrot_polysph
bandwidths by 50%. Can be also a matrix of initial bandwidth vectors.
rescale bandwidths to work on
\(\mathcal{S}^{d_1}\times\cdots\times \mathcal{S}^{d_r}\) and for
derivative estimation?
Defaults to FALSE. If upscale = 1, the order n is
upscaled. If upscale = 2, then also the kernel constant is upscaled.
derivative order to perform the upscaling. Defaults to 0.
softplus kernel parameter. Defaults to 10.0.
estimate of the concentration parameters. Computed if not provided (default).
further arguments passed to nlm.
The selector assumes that the density curvature matrix \(\boldsymbol{R}\) of the unknown density is approximable by that of a product of von Mises--Fisher densities, \(\boldsymbol{R}(\boldsymbol{\kappa})\). The estimation of the concentration parameters \(\boldsymbol{\kappa}\) is done by maximum likelihood.
If bw0 is a matrix, then the optimization is started at that row of
bandwidths that is most promising for the optimization, i.e., the bandwidths
that minimized the CV loss.
n <- 100
d <- 1:2
kappa <- rep(10, 2)
X <- r_vmf_polysph(n = n, d = d, mu = r_unif_polysph(n = 1, d = d),
kappa = kappa)
bw_rot_polysph(X = X, d = d)$bw
Run the code above in your browser using DataLab