hopt.be: Power-optimal bandwidth for the test statistic \hat{S}_n(h)

View source: R/hopt.be.R

hopt.beR Documentation

Power-optimal bandwidth for the test statistic \hat{S}_n(h)

Description

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).

Usage

hopt.be(xin)

Arguments

xin

A vector of data points - the available sample.

Details

Implements the Berry-Esseen bound optimal bandwidth defined in (18), Bagkavos, Patil and Wood (2022), given by

h = n^{-1/2} √{\frac{\hat ν_p R_4(K)}{ρ_\ast^2 \hat ν_4 I_0(K)} },

where

\hat ν_p = n^{-1} ∑_{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, ρ_\star=1 and

R_4(K)=\int K^4(x)\,dx.

Value

The estimate of the Berry-Esseen optimal bandwidth.

Author(s)

Dimitrios Bagkavos

R implementation and documentation: Dimitrios Bagkavos <dimitrios.bagkavos@gmail.com>

References

Bagkavos, Patil and Wood: Nonparametric goodness-of-fit testing for a continuous multivariate parametric model, (2021), under review.

See Also

hopt.edgeworth


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