GOFlaio2004 {nsRFA}R Documentation

Goodness of fit tests

Description

Anderson-Darling goodness of fit tests for extreme-value distributions, from Laio (2004).

Usage

 A2_GOFlaio (x, dist="NORM")
 A2 (F)
 W2 (F)
 Fx (x, T, dist="NORM")

Arguments

x data sample
dist distribution: normal "NORM", log-normal "LN", Gumbel "EV1", Frechet "EV2", Generalized Extreme Value "GEV", Pearson type III "GAM", log-Pearson type III "LP3"
F cumulative distribution function
T parameters (position, scale, shape, ...)

Details

An introduction on the Anderson-Darling test is available on http://en.wikipedia.org/wiki/Anderson-Darling_test and in the GOFmontecarlo help page. The oroginal paper of Laio (2004) is available on his web site.

Value

A2_GOFlaio tests the goodness of fit of a distribution with the sample x; it return the value A_2 of the Anderson-Darling statistics and its probability P(A2). If P(A2) is, for example, greater than 0.90, the test is not passed at level α=10%.
A2 is the Anderson-Darling test statistic; it is used by A2_GOFlaio.
W2 is the Cramer-von Mises test statistic.
Fx gives the empirical distribution function F of a sample x, extracted from the distribution dist with parameters T.

Author(s)

Alberto Viglione, e-mail: alviglio@tiscali.it.

References

Laio, F., Cramer-von Mises and Anderson-Darling goodness of fit tests for extreme value distributions with unknown parameters, Water Resour. Res., 40, W09308, doi:10.1029/2004WR003204.

See Also

GOFmontecarlo, MLlaio2004.

Examples

sm <- sample_generator(100, c(0,1), dist="EV1")
ML_estimation (sm, dist="GEV")
Fx (sm, ML_estimation (sm, dist="GEV"), dist="GEV")
A2(sort(Fx(sm, ML_estimation (sm, dist="GEV"), dist="GEV")))
A2_GOFlaio(sm, dist="GEV")

ML_estimation (sm, dist="GAM")
Fx(sm, ML_estimation (sm, dist="GAM"), dist="GAM")
A2(sort(Fx(sm, ML_estimation (sm, dist="GAM"), dist="GAM")))
A2_GOFlaio(sm, dist="GAM")

[Package nsRFA version 0.4-2 Index]