| GOFlaio2004 {nsRFA} | R Documentation |
Anderson-Darling goodness of fit tests for extreme-value distributions, from Laio (2004).
A2_GOFlaio (x, dist="NORM") A2 (F) W2 (F) Fx (x, T, dist="NORM")
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, ...) |
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.
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.
Alberto Viglione, e-mail: alviglio@tiscali.it.
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.
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")