Skip to content

r > zero(r) error using NegativeBinomial #1789

Answered by yebai
bhattsamir asked this question in Q&A
Discussion options

You must be logged in to vote

HMC samplers rely on bijective transforms to handle constrained variables (e.g. r). If the mass of the constrained variable is close to the boundary, then these transforms might suffer from numerical issues (e.g. violating the support). In the example above, one potential cause is that the prior over r has most of its mass close to zero. A simple solution to these problems is using a less informative prior, e.g. Exponential(0.5).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bhattsamir
Comment options

@mashu
Comment options

@bhattsamir
Comment options

Answer selected by bhattsamir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants