CM {gofIG}R Documentation

The Cramer-von Mises test statistic

Description

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.

Usage

CM(data)

Arguments

data

a vector of positive numbers.

Details

Let X_{(j)} denote the jth 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

value of the test statistic.

References

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

Examples

CM(rmutil::rinvgauss(20,2,1))


[Package gofIG version 1.0 Index]