Implements an optimal, with respect to Berry-Esseen bound, bandwidth for the density goodness-of-fit test \(\hat{S}_n(h)\) of Bagkavos, Patil and Wood (2021).
hopt.be(xin)The estimate of the Berry-Esseen optimal bandwidth.
A vector of data points - the available sample.
Dimitrios Bagkavos
R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com>
Implements the Berry-Esseen bound optimal bandwidth defined in (18), Bagkavos, Patil and Wood (2022), given by $$ h = n^{-1/2} \sqrt{\frac{\hat \nu_p R_4(K)}{\rho_\ast^2 \hat \nu_4 I_0(K)} }, $$ where $$ \hat \nu_p = n^{-1} \sum_{j=1}^n \hat f(X_j; \hat h_a), $$
and \(\hat h_a\) is the density optimal bandwidth calculated by a reference to a prametric distribution, \(\rho_\star=1\) and $$ R_4(K)=\int K^4(x)\,dx.$$
Bagkavos, Patil and Wood: Nonparametric goodness-of-fit testing for a continuous multivariate parametric model, (2021), under review.
hopt.edgeworth