GofTest: Goodness-of-fit test

Description Usage Arguments References Examples

Description

Return the statistic and p-value of a goodness of fit test on AMAX and POT mdoels. The null hypotesis (composite) is that the data were generated by the fitted distribution.

Usage

1
2
3
4
5
6
7
GofTest(x, ...)

## S3 method for class 'amax'
GofTest(obj, method = "ad", nsim = 1000, ...)

## S3 method for class 'fpot'
GofTest(obj, method = "adtab", nsim = 1000)

Arguments

obj

Output from FitAmax or FitPot.

method

Test to be performed. Either Anderson-Darling ad, or modified Shapiro-Wilk ('shapiro'). For a POT model, the method adtab perform the Anderson-Darling test and interpolates the p-value from a table.

References

Choulakian, V., Stephens, M.A., 2001. Goodness-of-Fit Tests for the Generalized Pareto Distribution. Technometrics 43, 478–484. https://doi.org/10.2307/1270819

Heo, J.-H., Shin, H., Nam, W., Om, J., Jeong, C., 2013. Approximation of modified Anderson–Darling test statistics for extreme value distributions with unknown shape parameter. Journal of Hydrology 499, 41–49. https://doi.org/10.1016/j.jhydrol.2013.06.008

Ba, I., Ashkar, F., 2017. Discrimination between a group of three-parameter distributions for hydro-meteorological frequency modeling. Can. J. Civ. Eng. 45, 351–365. https://doi.org/10.1139/cjce-2017-0416

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## The same simulated distribution should be accepted p-value >.05
x <- rAmax(100, c(100,30,-.1), 'gev')

fit <- FitAmax(x, 'gev', varcov = FALSE, nsim = 100)
GofTest(fit)

## The same apply to POT model
fit <- FitPot(flow~date, flowStJohn, u = 1000,
               declust = 'flood', r = 14)

## By default using a table of value with maximum likelihood
GofTest(fit)

martindurocher/floodStat documentation built on May 31, 2019, 12:42 a.m.