GAMMA3: Three-Parameter Gamma Distribution (also known as Pearson...

Description Usage Arguments Details Value References See Also Examples

Description

Density, distribution function, quantile function and random generation for the 3-parameter gamma distribution with shape, scale, and threshold (or shift) parameters equal to shape, scale, and thres, respectively.

Usage

1
2
3
4
dgamma3(x,shape=1,scale=1,thres=0,log=FALSE)
pgamma3(q,shape=1,scale=1,thres=0,lower.tail=TRUE,log.p=FALSE)
qgamma3(p,shape=1,scale=1,thres=0,lower.tail=TRUE,log.p=FALSE)
rgamma3(n,shape=1,scale=1,thres=0)

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

shape

shape parameter.

scale

scale parameter.

thres

threshold or shift 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 = Y+m has a 3-parameter gamma distribution with the same shape and scale parameters, and with threshold (or shift) parameter m.

Value

dgamma3 gives the density, pgamma3 gives the distribution function, qgamma3 gives the quantile function, and rgamma3 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.

See Also

dgamma, pgamma, qgamma, rgamma

Examples

1
2
3
4
thres <- 10
x <- rgamma3(n=10,shape=2,scale=11,thres=thres)
dgamma3(x,2,11,thres)
dgamma(x-thres,2,1/11)

Example output

 [1] 0.0326004734 0.0106116184 0.0132840252 0.0269172309 0.0077103519
 [6] 0.0030461017 0.0005155047 0.0315659821 0.0050922425 0.0235400470
 [1] 0.0326004734 0.0106116184 0.0132840252 0.0269172309 0.0077103519
 [6] 0.0030461017 0.0005155047 0.0315659821 0.0050922425 0.0235400470

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