rtrunc_gamma | R Documentation |
Simulates random variables from a truncated gamma distribution, where the gamma distribution is bounded between user-specified lower and upper limits. This function is typically used to define priors (e.g., for the separation time in delayed treatment effect models).
rtrunc_gamma(n, L, U, shape, scale)
n |
Integer. Number of random variables to generate. |
L |
Numeric. Lower bound of the truncation interval. Must satisfy |
U |
Numeric. Upper bound of the truncation interval. Must satisfy |
shape |
Numeric. Shape parameter of the underlying gamma distribution. |
scale |
Numeric. Scale parameter of the underlying gamma distribution. |
A numeric vector of length n
, containing random variables drawn from a gamma distribution truncated to the interval [L, U]
.
rtrunc_gamma(10, 1, 1, 1, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.