Last data update: 2014.03.03

R: Three-Parameter Gamma Distribution (also known as Pearson...
GAMMA3R Documentation

Three-Parameter Gamma Distribution (also known as Pearson type III distribution)

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

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FAdist)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FAdist/GAMMA3.Rd_%03d_medium.png", width=480, height=480)
> ### Name: GAMMA3
> ### Title: Three-Parameter Gamma Distribution (also known as Pearson type
> ###   III distribution)
> ### Aliases: dgamma3 pgamma3 qgamma3 rgamma3
> ### Keywords: distribution
> 
> ### ** Examples
> 
> thres <- 10
> x <- rgamma3(n=10,shape=2,scale=11,thres=thres)
> dgamma3(x,2,11,thres)
 [1] 0.031643661 0.031369472 0.025133487 0.018925171 0.030793159 0.021449892
 [7] 0.007214274 0.032351289 0.001983546 0.030659618
> dgamma(x-thres,2,1/11)
 [1] 0.031643661 0.031369472 0.025133487 0.018925171 0.030793159 0.021449892
 [7] 0.007214274 0.032351289 0.001983546 0.030659618
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>