Best way to test UDFs in PyStan?

Hi everyone,

How would you recommend testing UDFs for PyStan model given that the functions can’t be exposed directly into Python?

Compile separate test programs to evaluate them? This seems like overkill (and still requires some kind of statistical model)

Thanks!

What would you like to do?

Test model with generated quantities block and algorithm="Fixed_param" and some wrapping code in python probably works.

Yes this could be a viable option. If there’s lots of UDFs then you would need to compile lots of Stan programs to test them individually.

I suppose you can test them all simultaneously in one Stan program and then do the unit tests on the outputs.

Thanks!