CM: statistic of the Cramer-von Mises goodness-of-fit test for...

Description Usage Arguments Details Value References Examples

View source: R/teststatistics.R

Description

This function computes the goodness-of-fit test statistic for the gamma family in the spirit of Cramer and von Mises. Note that this tests the composite hypothesis of fit to the family of gamma distributions, i.e. a bootstrap procedure is implemented to perform the test, see crit.values.

Usage

1
CM(data, k_estimator)

Arguments

data

a vector of positive numbers. NOTE: data has to be the rescaled data, i.e. devided by the estimated scale parameter!

k_estimator

value of the estimated shape parameter.

Details

The Cramér-von Mises test is computed as described in Henze et. al. (2012). Values of k_estimator are found by gamma_est.

Value

value of the test statistic

References

Henze, N., Meintanis, S.G., Ebner, B. (2012) "Goodness-of-fit tests for the Gamma distribution based on the empirical Laplace transform". Communications in Statistics - Theory and Methods, 41(9): 1543-1556. DOI

Examples

1
2
X=stats::rgamma(20,3,6)
CM(X,k_estimator=gamma_est(X)[1])

gofgamma documentation built on April 29, 2020, 5:07 p.m.

Related to CM in gofgamma...