Pakillo / DHARMa.helpers

Helper functions to check Bayesian brms models with DHARMa
https://pakillo.github.io/DHARMa.helpers/
Other
3 stars 0 forks source link

DHARMa.helpers error message with Brms Ordinal Logit model #1

Closed GLad-Arioch closed 1 year ago

GLad-Arioch commented 1 year ago

Hi Franscico,

Thank you for providing us with this helpful bridge between brms and dharma.

I applied

dh_check_brms(mymodel, integer = TRUE)

to a repeated measures 3 levels ordinal logit.

The following error message is issued:

Error in t.default(brms::posterior_epred(model, ndraws = nsamples, re.form = NA)) : argument is not a matrix

What should I do?

Best regards,

Guillaume

Pakillo commented 1 year ago

Hi Guillaume,

I'm afraid that ordinal models are not supported (yet). I've added a note in the documentation to make that clear. I'm unclear how far DHARMa supports ordinal models too, hope this thread is useful to you: https://github.com/florianhartig/DHARMa/issues/174

Cheers

StaffanBetner commented 12 months ago

Sorry for posting in this closed issue, however, for ordinal models (in the simplest cases, where the effect doesn't vary due to level, the thresholds doesn't vary, etc.) we can replace posterior_epred with posterior_linpred, and get reasonable results.

Pakillo commented 4 months ago

Thanks @StaffanBetner ! That's helpful to know

Cheers