Closed osorensen closed 6 months ago
This means that in the ratio here:
I need to add a term (gamma - 1) * std::log(alpha_proposal / alpha_old)
.
Actually, two terms cancel and it becomes
double ratio =
alpha_diff / n_items * rank_dist +
priors.lambda * alpha_diff +
sum(observation_frequency) *
(pfun->logz(alpha_old) - pfun->logz(alpha_proposal)) +
priors.gamma * (std::log(alpha_proposal) - std::log(alpha_old));
In the JMLR paper, an exponential prior was assumed for the precision parameter. This makes it hard to obtain a "weakly informative" prior, as the only option we have is to concentrate mass close to 0. In contrast, Marta's 2019 AAS paper used a gamma prior, which is much more flexible. Here are some examples, the first two plots showing the exponential distribution and the second two plots showing the gamma distribution. If we have reason to believe the alpha is away from zero but also much smaller to 1000, then the last plot with the gamma distribution is definitely the best thing to use.
Created on 2024-02-07 with reprex v2.1.0
Also, this does not need to create any breaking changes, since the exponential distribution is a special case of the gamma distribution, as shown in the example below:
Created on 2024-02-07 with reprex v2.1.0