As I understand from this tutorial, the required functions are searched in the environment where the object is called so I need some extra code to generate those whenever I load a given fit. I was wondering if there’s a way to make these functions a part of a single object which contains the brmsfit and otherwise behaves like it.
You can pass the
log_lik etc. functions to
custom_family directly, which will then be stored inside the
brmsfit object and automatically used.