View source: R/FullConditionals.R
shift_GA | R Documentation |
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.
shift_GA(shape,
rate,
shift = 0,
param = c("rate", "scale"))
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 ( |
param |
Switch controlling whether the supplied |
A named vector of length 2, containing the modified shape and rate parameters, respectively.
This function is invoked within mcmc_IMIFA
when discount
is fixed at a non-zero value and learn.alpha=TRUE
.
Keefe Murphy - <keefe.murphy@mu.ie>
# Shift a Ga(shape=4, rate=2) distribution to the left by 1;
# achieving the same expected value of 2 and variance of 1.
shift_GA(4, 2, -1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.