CM {gofIG} | R Documentation |
This function computes value of the test statistic of the goodness-of-fit test for the inverse Gaussian family in the spirit of Cramer and von Mises. Note that this tests the composite hypothesis of fit to the family of inverse Gaussian distributions.
CM(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:
CM = \frac{1}{12n} + \sum_{j=1}^{n} \left( \hat{F}(X_{(j)}) - \frac{2j-1}{2n} \right)^2.
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
CM(rmutil::rinvgauss(20,2,1))