Learn R Programming

eggCounts (version 0.4-1)

update_h_kl: Update the parameter $theta$ (with FC of form $h(x) = x^{-a} \exp(-bx -c/x)$)) using eiter a gamma or an inverse gamma approximation to the FC as proposal depending on which distribution has smaller KL divergence.

Description

Update the parameter $theta$ (with FC of form $h(x) = x^{-a} \exp(-bx -c/x)$)) using eiter a gamma or an inverse gamma approximation to the FC as proposal depending on which distribution has smaller KL divergence.

Usage

update_h_kl(theta, argA, argC, a, b)

Arguments

argA
argument a (in parts) of the function h (e.g. n*phi for theta=mu)
argC
argument c of the function h (e.g. sum(mui)*phi for theta=mu)
a
shape parameter of the gamma prior for $theta$
b
rate parameter of the gamma prior for $theta$

Value

  • updated parameter $theta$