AD {gofIG} | R Documentation |
This function computes the test statistic of the goodness-of-fit test for the inverse Gaussian family in the spirit of Anderson and Darling.
AD(data)
data |
a vector of positive numbers. |
Let X_{(j)}
denote the j
th order statistic of X_1, \ldots, X_n
, a sequence of independent observations of a positive random variable X
. Furthermore, let \hat{F}(x) = F(x; \hat{\mu}_n, \hat{\lambda}_n)
, where F
is the distribution function of the inverse Gaussian distribution.
Note that \hat{\mu}_n,\hat{\lambda}_n
are the maximum likelihood estimators for \mu
and \lambda
, respectively, the parameters of the inverse Gaussian distribution.
The null hypothesis is rejected for large values of the test statistic:
AD = -n - \frac{1}{n} \sum_{j=1}^{n} \left[ (2j-1) \log \hat{F}(X_{(j)}) + (2(n-j) + 1) \log \left( 1 - \hat{F}(X_{(j)}) \right) \right].
value of the test statistic.
Allison, J.S., Betsch, S., Ebner, B., Visagie, I.J.H. (2022) "On Testing the Adequacy of the Inverse Gaussian Distribution". LINK
AD(rmutil::rinvgauss(20,2,1))