Skip to contents

Density, distribution function, quantile function and random generation for the Truncated Flipped Gamma distribution, a Gamma distribution reflected across the Y-axis, and truncted at endpoints a, b. Support provided by the truncdist package with all parameters available for a standard Gamma distribution. One additional parameter, offset is provided to generate Truncated Flipped Gamma distributions with non-zero right endpoints, ending at the offset value.

Usage

dtgamma_flip(x, shape, rate = 1, offset = 0, a = 0, b = Inf, ...)

ptgamma_flip(
  q,
  shape,
  rate = 1,
  offset = 0,
  a = 0,
  b = Inf,
  lower.tail = TRUE,
  ...
)

rtgamma_flip(n, shape, rate = 1, offset = 0, a = 0, b = Inf, ...)

qtgamma_flip(
  p,
  shape,
  rate = 1,
  offset = 0,
  a = 0,
  b = Inf,
  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

a

distribution start

b

distribution end

...

additional parameters to be passed to truncdist::dtrunc, truncdist::ptrunc, truncdist::rtrunc and truncdist::qtrunc

q

numeric vector of quantiles

lower.tail

logical; if TRUE (default), probabilities are PX <= x, otherwise, PX > x

n

number of observations

p

vector of probabilities

Value

density of distribution

distribution function

random deviates

quantile function