shift_GA: Moment Matching Parameters of Shifted Gamma Distributions
Description
This function takes shape and rate parameters of a Gamma distribution and modifies them to achieve the same expected value and variance when the left extent of the support of the distribution is shifted up or down.
A named vector of length 2, containing the modified shape and rate parameters, respectively.
Arguments
shape, rate
Shape and rate parameters a and b, respectively, of a Gamma(a, b) distribution. Both must be strictly positive.
shift
Modifier, such that the Gamma distribution has support on (shift, \(\infty\)). Can be positive or negative, though typically negative and small.
param
Switch controlling whether the supplied rate parameter is indeed a rate, or actually a scale parameter. Also governs whether the output is given in terms of rate or scale. Defaults to "rate".