Hi!

Hope this email finds you all well, safe and sane

I have question about applying hierarchical non-linear models in brms.

In particular, I have two questions:

- How do you make parameter estimates be a function of other parameters? I get the following message when I try it:

The parameter ‘reserveK’ is not a valid distributional or non-linear parameter. Did you forget to set ‘nl = TRUE’?

- How can I input information from two datasets or make it a conditional (if-else) if I use one dataset? For example, if two sets of data inform some specific parameters.

I have run the model in rstan, but when I do loo() I get pareto-k values that are 100% within 1-Inf (very bad), and thus have to go with k-fold. So I thought I would give the model a try with brms to see if I get the same loo results (and make sure I have no model misspecification).

Attached the stan model (txt) and some failed attempts to implement the same model with brms (.R)brms_failedattempts.R (3.6 KB) codeforbrms.txt (3.8 KB)

Thank you!

Best regards

J