Description Usage Arguments Details Value Author(s) References Examples
Computes the Exponential GoF tests based on the empirical distribution function: the Kolmogorov-Smirnov (KS), Cramer-Von-Mises (CM) and Anderson-Darling (AD) tests, the tests based on the probability plot: Shapiro-Wilk (SW) and Patwardhan (PA) tests and the tests based on the normalized spacings: Gnedenko (Gn) and Gini (G) tests.
1 | EDF_NS.test(x, type = "AD", nsim = 200)
|
x |
a numeric vector of data values. |
type |
the type of the test statistic used. "AD" is the default used test of Anderson-Darling,"KS" for Kolmogorov-Smirnov, "CM" for Cramer-Von-Mises, "SW" for Shapiro-Wilk, "PA" for Patwardhan, "Gn" for Gnedenko and "G" for Gini test statistic. |
nsim |
an integer specifying the number of replicates used in Monte Carlo. |
This function computes the GoF test statistics of three different families: the tests based on the empirical distribution function, the tests based on the probability plots and the tests based on the normalized spacings. The p-value of the tests is computed using Monte-Carlo simulations because only the asymptotic distribution of the previous statistics is known. Therefore the tests can be applied to small samples.
An object of class htest.
Meryam KRIT
D'Agostino R.B. and Stephens M.A., Goodness-of-fit techniques, Marcel Dekker, 1986.
Gail M.H. and Gastwirth J.L., A scale-free goodness-of-fit test for the exponential distribution based on the Gini statistic, Journal of the Royal Statistical Society, Series B, 40, 350-357, 1978.
Gnedenko B.V., Belyayev Y.K. and Solovyev A.D., Mathematical Models of Reliability Theory, Academic Press, 1969.
Shapiro S.S. and Wilk M.B., An analysis of variance test for the exponential distribution (complete samples), Technometrics, 14, 355-370, 1972.
Patwardhan G., Tests for exponentiality, Communications in Statistics, Theory and Methods, 17, 3705-3722, 1988.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | x1 <- rexp(50,2)
#Apply the Kolmogorov-Smirnov test
EDF_NS.test(x1,type="KS")
x2 <- rlnorm(50,0.2)
#Apply the Patwardhan test
EDF_NS.test(x2,type="PA")
#Apply the Cramer-von Mises test
EDF_NS.test(x2,type="CM")
#Apply the Gini test
EDF_NS.test(x2,type="G")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.