# fitDISTRI: Fit distribution functions by L-moments, probability weighted... In dazamora/IDFtool: Probability Density Function analysis and compute rainfall Intensity-Duration-Frequency curves

## Description

This function allows to fit several distribution functions to observed data by means of the methods L-moments, probability weighted moments, maximum likelihood and moments. It also assesses the goodness of fit test with different statistics (see `goodFIT`).

## Usage

 ```1 2 3``` ```fitDISTRI(Intensity = ..., Type = "Gumbel", Plot = 2, M.fit = "MLE", Periods = ..., Dura = ..., Station = ..., CI = FALSE, iter = .., goodtest = FALSE, Resolution = 300, SAVE = FALSE) ```

## Arguments

 `Intensity:` a numeric vector with intensity [mm/h] values of different years for a specific time duration (e.g. 5, 15, 120 minutes, etc.). `Type:` a character specifying the name of the distribution function that will be employed: exponencial, gamma, gev, gumbel, log.normal3, normal, pearson, log.pearson3 and wakeby (see `selecDIST`). `Plot:` a number (1) to determine if it will be plotted density curves both empirical as modeled (pdf). a number (2) to determine if it will be plotted curves between return `Periods` and intensity computed by pdf fitted. Or use both numbers to get these graphs. If any other number is used, graphs will not appear. `M.fit:` a character specifying the name of fit method employed on pdf, just three options are available: L-moments (Lmoments), Probability-Weighted Moments (PWD), Maximum Likelihood (MLE) (see `MLEZ`) and Moments (MME) (see `MME_DIST`). `Periods:` a numeric vector with return periods. `Dura:` a character specifying a time duration of the `Intensity`, (e.g. 30 min). This parameter is used to save results. `Station:` a character specifying a name or number of pluviographic station where data were measured. It is used to save results. `CI:` a logical value specifying whether confidence interval should be cumputed to pdf fitted by means `bootstrapCI` function. `iter:` an integer representing number of resamples to conduct when confidence interval will be computed (see `bootstrapCI`). Use it only if CI is equal to TRUE. `goodtest:` a logical value specifying whether goodness-fit tests should be cumputed to pdf fitted by means of `goodfit` function. `Resolution:` a number to determine 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 list with the fitted distribution and the parameters:

• `Parameters` a list with type of distribution fitted and values of its parameters

• `Int.pdf` a numeric vector of intensities values per each return `Periods` compute by pdf fitted.

• `Conf.Inter` a matrix with lower and upper limits of confidence interval for pdf fitted and computed for each return `Periods`.

• `goodness.fit` a data frame with statistics values of goodness of fit tests and its respective p-value, moreover information criteria are evaluated (see `goodFIT`)

• `Info.PDF` a vector with details about fit method and distribution function employed.

## Author(s)

David Zamora <[email protected]> Water Resources Engineering Research Group - GIREH

## Examples

 ```1 2 3 4 5``` ```# Meteorology station in the Farfan Airport in Tulua, Colombia. data(inten) fit.pdf <- fitDISTRI(Intensity =inten[15:35,2], Type ="Gumbel", Plot = 12, M.fit = "LMOMENTS", Periods =c(2,3,5,10,25,50,100), Dura ="5 min", Station ="2610", CI = TRUE, iter =100, goodtest = TRUE,Resolution = 300, SAVE = FALSE) ```

dazamora/IDFtool documentation built on March 20, 2018, 8:56 p.m.