| GammaR | R Documentation |
A gamma distribution in regression parameterization with mean mu and scale parameter sigma.
GammaR(mu = numeric(), sigma = numeric())
mu |
mean of the distribution. Must be positive. |
sigma |
scale parameter. Must be positive. |
We recommend reading this documentation on https://zeileis.github.io/distributions3/, where the math will render with additional detail.
In the following, let X be a Gamma random variable in
regression parameterization with mean mu = \mu and scale
sigma = \sigma. The first four moments are given below.
For computing densities, probabilities, quantiles, etc., the
distribution is reparameterized internally to use
shape \alpha = 1/\sigma^2 and rate \beta = 1/(\mu \sigma^2)
as in the classic Gamma() distribution.
Support: x \in (0, \infty)
Mean: \mu
Variance: \mu^2 \sigma^2
Skewness: 2 \sigma
Excess kurtosis: 6 \sigma^2
A GammaR object.
set.seed(27)
X <- GammaR(mu = 2, sigma = 0.5)
X
random(X, 10)
pdf(X, 1)
log_pdf(X, 1)
cdf(X, 1)
quantile(X, 0.7)
cdf(X, quantile(X, 0.7))
quantile(X, cdf(X, 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.