KS {gofIG}R Documentation

The Kolmogorov-Smirnov test statistic

Description

This function computes the test statistic of the goodness-of-fit test for the inverse Gaussian family in the spirit of Kolmogorov and Smirnov. Note that this tests the composite hypothesis of fit to the family of inverse Gaussian distributions.

Usage

KS(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:

KS = \max(D^+, D^-),

where

D^+ = \max_{j=1,\ldots,n} \left( \frac{j}{n} - \hat{F}(X_{(j)}) \right)

and

D^- = \max_{j=1,\ldots,n} \left( \hat{F}(X_{(j)}) - \frac{j-1}{n} \right).

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

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


[Package gofIG version 1.0 Index]