Continuous binomial, negative binomial and Poisson

Hi All,

You might have seen things such as this paper by Tullia Padellini and Havard Rue. Does anyone know if this has been tried in Stan?

I wanted to give this a try, but am lacking a nice, compelling example. Does anyone have a model involving binomial, negative binomial or Poisson latent variables you’d like to fit in Stan but couldn’t because the marginalisation isn’t tractable?

Tagging: @bgoodri @Bob_Carpenter for the modelling part and @betanalpha for the “telling me this is a stupid idea” part.

1 Like

Maybe as an alternative to this:


1 Like

A necessary condition for this continuous embedding to be useful is the ability to compute explicit probability density functions. The paper needs only the cumulative density function for the quantile regression application – Stan would need those CDFs to be differentiated once with respect to the input variable to get the associated density function, and then a second time with respect to the input variables and all of the parameters for the density gradients that drive Hamiltonian Monte Carlo.

The derivatives of the CDFs with respect to the input variables have been worked out in the Stan CDFs implementations, although not all of them are numerically robust at more extreme inputs. The derivatives of those derivatives and the parameter derivatives have largely not been worked out – in some cases they might be straightforward (the continuous Poisson just needs polygammas which are pretty straightforward) and in some cases they are more problematic (in the incomplete beta there be dragons).

1 Like