| bwFo | R Documentation |
This function computes the optimal smoothing parameter (bandwidth) for circular data using the Fourier series-based direct plug-in approach based on delta sequence estimators (see \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10485252.2022.2057974")}).
bwFo(x, C1 = 0.25, C2 = 25, gamma = 0.5)
x |
Data from which the smoothing parameter is to be computed. The object is
coerced to a numeric vector in radians using |
C1 |
Numeric scalar (default 0.25) representing the lower bound constant for
determining the range of Fourier coefficients. Used to compute the lower bound
|
C2 |
Numeric scalar (default 25) representing the upper bound constant for
determining the range of Fourier coefficients. Used to compute the upper bound
|
gamma |
Numeric scalar between 0 and 1 (default 0.5) representing the penalty
parameter in the criterion function |
The Fourier-based plug-in estimator computes the optimal bandwidth using the formula:
\hat{h}_{FO} := (4\pi)^{-1/10} \hat{\theta}_{2,\hat{m}}^{-1/5} n^{-1/5}
where \hat{\theta}_{2,\hat{m}} is the estimator of the second-order functional
\theta_2(f) based on the selected number of Fourier coefficients \hat{m}.
Under the assumption of von Mises density, this formula becomes:
\hat{h}_{VM} = (4\pi)^{-1/10} \left(\frac{3\hat{\kappa}^2 I_0(2\hat{\kappa}) - \hat{\kappa}I_1(2\hat{\kappa})}{8\pi I_0(\hat{\kappa})^2}\right)^{-1/5} n^{-1/5}
where I_0 and I_1 are the modified Bessel functions of the first kind of orders 0 and 1,
and \hat{\kappa} is the estimated concentration parameter of the von Mises distribution.
The computed optimal smoothing parameter kappa, a numeric concentration
parameter (analogous to inverse radians) derived from the Fourier method for circular
kernel density estimation. Higher values indicate sharper, more concentrated kernels
and less smoothing; lower values indicate broader kernels and more smoothing.
Tenreiro, C. (2022). Kernel density estimation for circular data: a Fourier series-based plug-in approach for bandwidth selection. Journal of Nonparametric Statistics, 34(2):377–406. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/10485252.2022.2057974")}
bwScv, bwLscvg, bwCcv
# Example with circular data
library(circular)
set.seed(123)
x <- rvonmises(100, mu = circular(0), kappa = 2)
bw <- bwFo(x)
print(bw)
x <- rwrappednormal(100, mu = circular(1), rho = 0.7)
bw <- bwFo(x)
y <- density(x, bw=bw)
plot(y, main="KDE with Fourier Plug-in Bandwidth")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.