hopt.edgeworth {L2DensityGoFtest} | R Documentation |
Power-optimal bandwidth for the density goodness-of-fit test S.n
.
Description
Implements the power-optimal bandwidth for density goodness-of-fit test S.n
based on optimization of the test statistic's power function.
Usage
hopt.edgeworth(xin, dist, kfun, p1, p2, sig.lev)
Arguments
xin |
A vector of data points - the available sample. |
dist |
The null distribution. |
kfun |
The kernel to use in the density estimates used in the bandwidth expression. |
p1 |
Parameter 1 (vector or object) for the null distribution. |
p2 |
Parameter 2 (vector or object) for the null distribution. |
sig.lev |
Significance level of the hypothesis test. |
Details
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.
Value
A scalar, the estimate the power-optimal bandwidth.
Author(s)
Dimitrios Bagkavos
R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com>
References
Gao and Gijbels, Bandwidth selection in nonparametric kernel testing, pp. 1584-1594, JASA (2008)