Random-effect specifications for non-linear model

Hey all,

I’m working on a non-linear model using ‘brms’, specifically, a dose-response model.
My response data are binomial, and the model is a four-parameter sigmoid. I’m wondering about an efficient strategy in brms for defining the grouping variance, in the case where parameters are bounded.

For binomial responses the parameters defining the upper and lower bounds EMAX and EMIN are naturally constrained to be (0,1), which can be accommodated using the identity link for the response and, say, beta priors for those population parameters.

What about the grouping parameters? Say for example I have (1|Subject) within my non-linear specification:

bf(Count|trials(Total) ~ EMIN + ((EMAX) /(X+EC50)), EMIN+EMAX+EC50 ~ 1 + (1|Subject), nl = TRUE) 

Then the parameter EMAX for example is normally-distributed across ‘Subject’, but I’d like it to be (0,1) constrained. I could specify them in log-space to accommodate a lower zero bound, but is there a simple strategy (logit-transformation?) to work with both lower and upper bounds?

Cheers!

Hi,
the logit transformation of the EMIN and EMAX seems to me the most straightforward implementation of the lower and upper bounds, but I also came across cases where there have been beta-distributed group effects and it worked within brms/stan.

@gkreil thanks, I did implement the logistic transformation which has seemed effective so far. I wasn’t aware that I could specify the inverse logistic function in the formula for the non-linear model.

Unfortunately, some of the parameters are very difficult to sample so it needs some re-parameterization.