SBC icon indicating copy to clipboard operation
SBC copied to clipboard

generate_datasets fails with nonlinear brms models

Open hrlai opened this issue 1 year ago • 3 comments

Hi devs, I have a brms model fitted with the set_nl(TRUE) formula setting. Then I got the following error from generate_datasets:

Error in UseMethod("brms_response_sequence") : 
  no applicable method for 'brms_response_sequence' applied to an object of class "btnl"

Could they be related? Thanks.

hrlai avatar Nov 27 '23 20:11 hrlai

Unfortunately, automatic datset generation for non-linear brms models is not currently supported (the error should be clearer on that). For most use cases, I'd strongly suggest writing your own generator anyway - if your model specification does something different than what you'd like the automatic generator will replicate the issue and you will not notice any problems, despite the model being incorrect...

martinmodrak avatar Nov 28 '23 08:11 martinmodrak

Thanks for the quick reply. I'll explore the custom generator. Gonna close this for now since it isn't an immediate fix. :)

hrlai avatar Nov 28 '23 23:11 hrlai

I'll keep it open - we definitely should at least improve the error message. It is also possible that supporting non-linear models won't be that hard - we never really tried doing that.

martinmodrak avatar Nov 29 '23 12:11 martinmodrak