ABEV2 function

The second Allison-Betsch-Ebner-Visagie test statistic

The second Allison-Betsch-Ebner-Visagie test statistic

This function computes the second test statistic of the goodness-of-fit tests for the inverse Gaussian family due to Allison et al. (2022). Two different estimation procedures are implemented, namely the method of moment and the maximum likelihood method.

ABEV2(data, a = 10, meth = "MME")

Arguments

  • data: a vector of positive numbers.
  • a: positive tuning parameter.
  • meth: method of estimation used. Possible values are 'MME' for moment estimation and 'MLE' for maximum likelihood estimation.

Returns

value of the test statistic.

Details

The numerically stable test statistic for the second Allison-Betsch-Ebner-Visagie test is defined as:

ABEV2n,a=14nj,k=1n(φ^n+3Yn,jφ^nYn,j2)(φ^n+3Yn,kφ^nYn,k2)h~1,a(Yn,j,Yn,k) ABEV2_{n,a} = \frac{1}{4n} \sum_{j,k=1}^{n} \left( \hat{\varphi}_n + \frac{3}{Y_{n,j}} - \frac{\hat{\varphi}_n}{Y_{n,j}^2} \right) \left( \hat{\varphi}_n + \frac{3}{Y_{n,k}} - \frac{\hat{\varphi}_n}{Y_{n,k}^2} \right) \tilde{h}_{1,a}(Y_{n,j}, Y_{n,k}) 2(φ^n+3Yn,jφ^nYn,j2)h~2,a(Yn,j,Yn,k) - 2 \left( \hat{\varphi}_n + \frac{3}{Y_{n,j}} - \frac{\hat{\varphi}_n}{Y_{n,j}^2} \right) \tilde{h}_{2,a}(Y_{n,j}, Y_{n,k}) 2(φ^n+3Yn,kφ^nYn,k2)h~2,a(Yn,k,Yn,j) - 2 \left( \hat{\varphi}_n + \frac{3}{Y_{n,k}} - \frac{\hat{\varphi}_n}{Y_{n,k}^2} \right) \tilde{h}_{2,a}(Y_{n,k}, Y_{n,j}) +4πaΦ(2amax(Yn,j,Yn,k)), + 4 \frac{\sqrt{\pi}}{a} \Phi \left( - \sqrt{2a} \max(Y_{n,j}, Y_{n,k}) \right),

with φ^n=λ^nμ^n\hat{\varphi}_n = \frac{\hat{\lambda}_n}{\hat{\mu}_n}, where μ^n,λ^n\hat{\mu}_n,\hat{\lambda}_n are consistent estimators of μ,λ\mu, \lambda, respectively, the parameters of the inverse Gaussian distribution. Furthermore Yn,j=Xjμ^nY_{n,j} = \frac{X_j}{\hat{\mu}_n}, j=1,...,nj = 1,...,n, for (Xj)j=1,...,n(X_j)_{j = 1,...,n}, a sequence of independent observations of a positive random variable XX. The functions h~i,a(s,t)\tilde{h}_{i,a}(s,t), i=1,2i = 1,2, are defined in Allison et al. (2022), section 5.1, and Φ\Phi denotes the distribution function of the standard normal distribution. The null hypothesis is rejected for large values of the test statistic ABEV2n,aABEV2_{n,a}.

Examples

ABEV2(rmutil::rinvgauss(20,2,1),a=10,meth='MLE')

References

Allison, J.S., Betsch, S., Ebner, B., Visagie, I.J.H. (2022) "On Testing the Adequacy of the Inverse Gaussian Distribution". LINK

  • Maintainer: Bruno Ebner
  • License: CC BY 4.0
  • Last published: 2024-11-01

Useful links