bambinos / bambi

BAyesian Model-Building Interface (Bambi) in Python.
https://bambinos.github.io/bambi/
MIT License
1.08k stars 124 forks source link

No likelihood for Ordinal model #789

Closed zaizibai closed 7 months ago

zaizibai commented 7 months ago

Hi devs, thanks for making bambi this wonderful software. I noticed that ordinal regression was introduced after 0.12.0 bambi. I tried the cumulative model in bambi, but when i tried to do the model comparison, I found that returned xarray file does not include the log-likelihood estimation so that there is no way to do model comparison for cumulative ordinal model? Thanks a lot!

GStechschulte commented 7 months ago

Hey @zaizibai thanks for raising the issue. When doing model.fit(...) are you passing the following kwargs model.fit(..., idata_kwargs={"log_likelihood": True})?

By default, this is False.

GStechschulte commented 7 months ago

Hey @zaizibai did this resolve your problem? Cheers!

tomicapretto commented 7 months ago

Feel free to re-open if the suggested approach doesn't work :)