goodFIT: Computing of goodness-of-fit metrics and information...

View source: R/goodFIT.R

goodFITR Documentation

Computing of goodness-of-fit metrics and information criterias

Description

This function computing of goodness-of-fit for continuous univariate distributions using tests: Kolmogorov-Smirnov, Anderson-Darling and Cramer-von Mises. It is based on goftest package. Moreover information criteria are evaluated: Akaike's Information Criterion and Bayesian Information Criterion, Akaike's Information Criterion with bias correction and Kashyap bayesian Information Criterio by means of InfoCRIT function.

Usage

goodFIT(Station, Type, Intensity, Parameters, M.fit, Dura, Plot,
  Resolution = 300, SAVE = FALSE)

Arguments

Station

a character specifying a name or number of pluviographic station where data were measurement, and it use to save results in *.xls format.

Type

a character specifying a name of probability distribution function fitted (see selecDIST) by fitDISTRI function.

Intensity

a numeric vector with intensity values for a specific time duration in different return periods.

Parameters

a list with three elements: i) Type of distribution function ii) fitted parameters, and iii) source to call specfic function in the lmomco package.

M.fit

a character specifying a name of fit method employed on pdf, just three options are available: L-moments (Lmoments), Probability-Weighted Moments (PWD), and Maximum Likelihood (MLE).

Dura

a character specifying a time duration of the Intensity, (e.g. 30 min). This parameter is used to save results.

Plot

a number (1) to determine if it will be plotted density curves both empirical as modeled (pdf). If any other number is used graphs will not appear.

Resolution

a number to determine the resolution that the plot function will used to save graphs. It has two options: 300 and 600 ppi. See resoPLOT.

SAVE

a logical value. TRUE will save Plot, FALSE will just show it.

Value

A data frame with statistics values of goodness of fit tests and its respective p-value, moreover information criteria are evaluated:

  • Kolmogorov-Smirnov: statistic= KS and p-value1

  • Anderson-Darling: statistic= AD and p-value2

  • Cramer-von Mises: statistic= Omega2 and p-value3

  • Akaike's Information Criterion: AIC

  • Bayesian Information Criterion: BIC

  • Akaike's Information Criterion with bais correction: AICc

  • Kashyap bayesian Information Criterion: KIC

Author(s)

David Zamora <dazamoraa@unal.edu.co> Water Resources Engineering Research Group - GIREH

References

Hurvich, C. M., & Tsai, C. L. (1989). Regression and time series model selection in small samples. Biometrika, 76(2), 297-307.

Kashyap, R. L. (1982). Optimal choice of AR and MA parts in autoregressive moving average models. IEEE Transactions on Pattern Analysis and Machine Intelligence, (2), 99-104.

Examples


# Meteorology station in the Airport Farfan in Tulua, Colombia.
data(Intgum5min)
data(Pargumbel)
# not plotted
test.fit <- goodFIT(Station = "2610516", Type = "Gumbel", Intensity = Intgum5min,
                    Parameters = Pargumbel,M.fit = "Lmoments", Dura ="5_min", Plot = 0)
 

dazamora/IDFtool documentation built on Jan. 1, 2023, 3:29 p.m.