Missing von Mises distribution in brms 2.22.0?

I just updated my brms version to 2.22.0, and am now getting an error message when trying to fit a von Mises model to some data. The message is as follows:

In file(con, “r”) :
cannot open file ‘/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library/brms/chunks/fun_von_mises.stan’: No such file or directory

I’ve checked the directory itself, and sure enough, whereas all the other distribution functions are there, the von Mises one is missing. The model was working 5 minutes ago before I updated brms, and I’m not having the same issue if I fit the data with a Gaussian model, so I strongly suspect the updated version is to blame. Nonetheless, if anyone else has come across this error and/or can identify another reason it’s occurring, I’d appreciate hearing about it.

Some github sleuthing reveals that file was removed in this change: use von_mises_lpdf directly instead of von_mises2_lpdf after next stan update · Issue #1633 · paul-buerkner/brms · GitHub

The bug you are seeing appears to have been fixed: remove outdated include statement by venpopov · Pull Request #1678 · paul-buerkner/brms · GitHub

Perhaps you can try installing the github version, and if that doesn’t work report your issue there.

1 Like

Thanks for the sleuthing. The version on github still gives the same error, unfortunately, so I’ll report the bug.

For anyone reading this later, it was not an issue with brms itself, but rather (as I understand it) some holdover code from an old version still being attached to models I was then fitting with a new version.

2 Likes