Hi junpenglao,
Thank you for your advice. So it seems the issue is that if the standard deviation draws are much greater than the mean this results in alpha/beta parameters which cause a draw of the gamma distribution outside of 0 to infinity?
Is there anything I can do to parameterize the Gamma distribution in terms of alpha and beta but have those parameters be a deterministic transform on mu and sd to ensure that the draws are in the support of gamma?
Also, how can I diagnose the NaN in optimization with ADVI?