rgamma_coupled: Sample from maximally coupled Gamma variables

View source: R/gamma_couplings.R

rgamma_coupledR Documentation

Sample from maximally coupled Gamma variables

Description

Draws a pair of variables, respectively Gamma(alpha1, beta1) and Gamma(alpha2, beta2) where the parametrization is that beta is the rate, i.e. the log-pdf of Gamma(alpha,beta) evaluated at x is

α * log(β) - lgamma(α) + (α-1) * log(x) - β x

where lgamma stands for the logarithm of the Gamma function.

Usage

rgamma_coupled(alpha1, alpha2, beta1, beta2)

Arguments

alpha1

First shape

alpha2

Second shape

beta1

First rate

beta2

Second rate

Value

A list with entry 'xy' for the pair of values, and boolean 'identical' indicating whether the two values are identical.


pierrejacob/debiasedmcmc documentation built on Aug. 22, 2022, 12:41 a.m.