I’m able to fit this formula, but when I try to use brms’s predict() function, I get the error
Error in fmax(x0, x) : could not find function "fmax"
Most likely this is because you used a Stan function in the non-linear model formula that is not defined in R. If this is a user-defined function, please run 'expose_functions(., vectorize = TRUE)' on your fitted model and try again.
While I understand the issue, I can’t seem to find a solution.
For example, if I define fmax <- function(x,y) max(x,y) within my R session the error goes away, but the output from predict() consists solely of 0s.