hopt.edgeworth: Power-optimal bandwidth for the density goodness-of-fit test...

View source: R/hopt.edgeworth.R

hopt.edgeworthR 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 = ≤ft \{ \frac{√{2} K^{(3)}(0)}{3R(K)^{3/2}} \frac{ν_2}{R(f)^{3/2}}\right \}^{-1/2} ≤ft \{ \frac{n \int Δ_n^2 (x) f^2(x)\,dx}{σ^2 \{ 2 ν_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)

See Also

hopt.be


L2DensityGoFtest documentation built on Feb. 16, 2023, 9:24 p.m.