stan-dev / pystan

PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io
ISC License
342 stars 59 forks source link

multi_normal missing? #334

Closed dirknbr closed 2 years ago

dirknbr commented 2 years ago

I am getting this error

Ill-typed arguments to '~' statement. No distribution 'multi_normal' was found with the correct signature.Traceback (most recent call last):

So for some strange reason that distribution is not supported. I updated my pystan to latest version with pip. But the latest stan version shows it exists.

https://mc-stan.org/docs/2_28/functions-reference/multivariate-normal-distribution.html

Is maybe the error message misleading?

dirknbr commented 2 years ago

Ok I found the bug, my Y was a matrix but needs to be vector.

Error message was confusing

bob-carpenter commented 2 years ago

@dirknbr: We're working on trying to formulate error messages that'll be clearer to users. Do you have a suggestion for how we can rephrase the one you ran into (keeping in mind that multi_normal has multiple signatures)?

Ill-typed arguments to '~' statement. No distribution 'multi_normal' was found with the correct signature.

P.S. If you want to vectorize, the variate can be an array of vectors (as can the location param, I believe).