Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

inverse.Gamma

Distribution families for Gamma and inverse Gamma-distributed random effects


Description

For dispersion parameter λ, Gamma means that random effects are distributed as u ~Gamma(shape=1/λ,scale=λ), so u has mean 1 and variance λ. Both the log (v=log(u)) and identity (v=u) links are possible, though in the latter case the variance of u is constrained below 1 (otherwise Laplace approximations fail).

The two-parameter inverse Gamma distribution is the distribution of the reciprocal of a variable distributed according to the Gamma distribution Gamma with the same shape and scale parameters. inverse.Gamma implements the one-parameter inverse Gamma family with shape=1+1/λ and rate=1/λ) (rate=1/scale). It is used to model the distribution of random effects. Its mean=1; and its variance =λ/(1-λ)) if λ<1, otherwise infinite. The default link is "-1/mu", in which case v=-1/u is “-Gamma”-distributed with the same shape and rate, hence with mean -(λ+1) and variance λ(λ+1), which is a different one-parameter Gamma family than the above-described Gamma. The other possible link is v=log(u) in which case
v ~ -log(X~Gamma(1+1/λ,1/λ)), with mean -(log(1/λ)+digamma(1+1/λ)) and variance trigamma(1+1/λ).

Usage

inverse.Gamma(link = "-1/mu")
# Gamma(link = "inverse") using stats::Gamma

Arguments

link

For Gamma, allowed links are log and identity (the default link from Gamma, "inverse", cannot be used for the random effect specification). For inverse.Gamma, allowed links are "-1/mu" (default) and log.

Examples

# see help("HLfit") for fits using the inverse.Gamma distribution.

spaMM

Mixed-Effect Models, with or without Spatial Random Effects

v3.10.0
CeCILL-2
Authors
François Rousset [aut, cre, cph] (<https://orcid.org/0000-0003-4670-0371>), Jean-Baptiste Ferdy [aut, cph], Alexandre Courtiol [aut] (<https://orcid.org/0000-0003-0637-2959>), GSL authors [ctb] (src/gsl_bessel.*)
Initial release
2022-02-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.