# LGAMMA3: Log-Pearson Type III Distribution In FAdist: Distributions that are Sometimes Used in Hydrology

## Description

Density, distribution function, quantile function and random generation for the log-Pearson type III distribution with shape1, shape2, and scale parameters equal to `shape`, `scale`, and `thres`, respectively.

## Usage

 ```1 2 3 4``` ```dlgamma3(x,shape=1,scale=1,thres=1,log=FALSE) plgamma3(q,shape=1,scale=1,thres=1,lower.tail=TRUE,log.p=FALSE) qlgamma3(p,shape=1,scale=1,thres=1,lower.tail=TRUE,log.p=FALSE) rlgamma3(n,shape=1,scale=1,thres=1) ```

## Arguments

 `x,q` vector of quantiles. `p` vector of probabilities. `n` number of observations. `shape` shape1 parameter. `scale` shape2 parameter. `thres` scale parameter. `log,log.p` logical; if TRUE, probabilities p are given as log(p). `lower.tail` logical; if TRUE (default), probabilities are P[X <= x],otherwise, P[X > x].

## Details

If Y is a random variable distributed according to a gamma distribution (with shape and scale parameters), then X = exp(Y+m) has a log-Pearson type III distribution with shape1 and shape2 parameters corresponding to the shape and 1/scale parameteres of Y, and with scale parameter m.

## Value

`dlgamma3` gives the density, `plgamma3` gives the distribution function, `qlgamma3` gives the quantile function, and `rlgamma3` generates random deviates.

## References

BOBEE, B. and F. ASHKAR (1991). The Gamma Family and Derived Distributions Applied in Hydrology. Water Resources Publications, Littleton, Colo., 217 p.

`dgamma`, `pgamma`, `qgamma`, `rgamma`, `dgamma3`, `pgamma3`, `qgamma3`, `rgamma3`

## Examples

 ```1 2 3 4 5``` ```thres <- 10 x <- rlgamma3(n=10,shape=2,scale=11,thres=thres) dlgamma3(x,2,11,thres) dgamma3(log(x),2,1/11,thres)/x dgamma(log(x)-thres,2,11)/x ```

### Example output

``` [1] 1.942756e-05 1.469097e-04 1.953968e-05 7.919670e-05 1.512779e-04
[6] 1.052949e-04 7.148786e-05 5.941921e-05 7.285487e-05 1.237512e-04
[1] 1.942756e-05 1.469097e-04 1.953968e-05 7.919670e-05 1.512779e-04
[6] 1.052949e-04 7.148786e-05 5.941921e-05 7.285487e-05 1.237512e-04
[1] 1.942756e-05 1.469097e-04 1.953968e-05 7.919670e-05 1.512779e-04
[6] 1.052949e-04 7.148786e-05 5.941921e-05 7.285487e-05 1.237512e-04
```

FAdist documentation built on April 17, 2020, 1:24 a.m.