I have very simple non-linear model:
x <- rnorm(100)
n <- rbinom(100, 1, 0.5)
y <- 1.5-1*n + exp(x) + rnorm(100, 0, 0.1)
Where “n” is simply a 0 or 1 grouping variable, like male/female etc…
fit ← brm(bf(y ~ a + b * exp(x), nl=TRUE, a ~ 1 + n, b ~ 1), data=data.frame(y, x, n),prior= prior(normal(0,1), nlpar=“a”, lb=0) +prior(normal(0,1), nlpar=“b”), cores=4 )
Bounding parameter “a” to be positive (it has to be in my model), force the effect of “n” to always be positive, is there a workaround for this without splitting “a” into 2 parameters?