Skip to contents

Density, distribution function, quantile function and random generation for the Flipped Gamma distribution, a Gamma distribution reflected across the Y-axis. shape, rate and other parameters are inherited from the stats package. One additional parameter, offset is provided to generate Flipped Gamma distributions with non-zero right endpoints, ending at the offset value.

Usage

dgamma_flip(x, shape, rate = 1, offset = 0, ...)

pgamma_flip(q, shape, rate = 1, offset = 0, lower.tail = TRUE, ...)

rgamma_flip(n, shape, rate = 1, offset = 0, ...)

qgamma_flip(p, shape, rate = 1, offset = 0, lower.tail = TRUE, ...)

Arguments

x

numeric vector of quantiles

shape

shape parameter of gamma distribution

rate

rate parameter of gamma distribution, default 1

offset

offset of the right end of the distribution

...

additional parameters to be passed to stats::dgamma, stats::pgamma, stats::rgamma and stats::qgamma

q

numeric vector of quantiles

lower.tail

logical; if TRUE (default), probabilities are \(P[X \le x]\), otherwise, \(P[X > x]\).

n

number of observations

p

vector of probabilities

Value

density of distribution

distribution function

random deviates

quantile