The code needed is what is messy/ugly (subjective opinion), but the approach should be perfectly fine.
The moment is not an error, just a warning. You can set an initval
when you call model.register_rv
, if you want to fix the initial point to a specific value. If you are okay with a draw from the prior, you can set initval="prior"
, to silence the warning. If your scan variable is observed, you won’t need to, in that case you pass the observed data as data
when calling model.register_rv
.
For the error, I need to try it out