Hi All,

I’ve been conducting large-scale testing of Stan using the models located in the example-models repository (https://github.com/stan-dev/example-models/). The idea is to use this to create a broad and diverse benchmark for the SMC-based algorithms we’re developing.

We expected that there may be issues running the new SMC algorithm on existing Stan models, and indeed we have seen some errors which are unique to these changes. However, we were surprised to find that NUTS was running into a lot of errors as well.

I’ve been looking in detail at these errors today and it seems that the vast majority are from incorrect formatting used within the dump data input files (e.g. some instead contain native R code). However, there’s also 9 models which have initialization errors:

- example-models/misc/multivariate-probit/probit-multi-good
- example-models/misc/dlm/fx_factor
- example-models/knitr/pool-binary-trials/pool
- example-models/knitr/pool-binary-trials/no-pool
- example-models/knitr/pool-binary-trials/hier
- example-models/knitr/pool-binary-trials/hier-logit-centered
- example-models/knitr/pool-binary-trials/hier-logit
- example-models/knitr/chapter2/golf1
- example-models/knitr/golf/golf1

These can be subdivided into 3 apparently independent errors.

probit-multi-good:

Phi: x is nan, but must not be nan!

fx_factor:

gaussian_dlm_obs_lpdf: G[1] is nan, but must be finite!

pool, no-pool, hier, hier-logit-centered, hier-logit:

binomial_logit_lpmf: Successes variable[1] is 4, but must be in the interval [0, 3]

golf1:

binomial_lpmf: Probability parameter[1] is <negative_value>, but must be in the interval [0, 1]

The binomial_logit_lpmf error may be down to the fact that the knitr models use “garbage generated data” that doesn’t make sense in the context (https://github.com/stan-dev/example-models/commit/9917f716b90cc072ae75bb2fd9dc020cc6dd5d4c). However, I’ve played around with the changing the init parameter and the input data for a couple of the other models and I’m still getting the same errors.

Does anyone have an idea why Stan is having initialization problems with these models? Interested to hear everyone’s thoughts!

Phil