EDF_NS.test {EWGoF}R Documentation

GoF tests based on the empirical distribution function, the normalized spacings and the probability plots for the Exponential distribution

Description

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.

Usage

EDF_NS.test(x, type = "AD", nsim = 200)

Arguments

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.

Details

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.

Value

An object of class htest.

Author(s)

Meryam KRIT

References

Examples


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")


[Package EWGoF version 2.2.2 Index]