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:
These can be subdivided into 3 apparently independent errors.
Phi: x is nan, but must not be nan!
gaussian_dlm_obs_lpdf: G is nan, but must be finite!
pool, no-pool, hier, hier-logit-centered, hier-logit:
binomial_logit_lpmf: Successes variable is 4, but must be in the interval [0, 3]
binomial_lpmf: Probability parameter 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!