S.n.Implements the power-optimal bandwidth for density goodness-of-fit test S.n based on optimization of the test statistic's power function.
hopt.edgeworth(xin, dist, kfun, p1, p2, sig.lev)A scalar, the estimate the power-optimal bandwidth.
A vector of data points - the available sample.
The null distribution.
The kernel to use in the density estimates used in the bandwidth expression.
Parameter 1 (vector or object) for the null distribution.
Parameter 2 (vector or object) for the null distribution.
Significance level of the hypothesis test.
Dimitrios Bagkavos
R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com>
Implements: the power-optimal bandwidth for the test statistic S.n given by
$$ h = \left \{ \frac{\sqrt{2} K^{(3)}(0)}{3R(K)^{3/2}} \frac{\nu_2}{R(f)^{3/2}}\right \}^{-1/2} \left \{ \frac{n \int \Delta_n^2 (x) f^2(x)\,dx}{\sigma^2 \{ 2 \nu_2 R(K)\}^{1/2}} \right \}^{-3/2}.$$
This bandwidth rule is the density function equivalent bandwidth rule obtained in the closely relatated regression setting in Gao and Gijbels (2008) and is designed to optimize the test's power subject to keeping the size contant.
Gao and Gijbels, Bandwidth selection in nonparametric kernel testing, pp. 1584-1594, JASA (2008)
hopt.be