Adding addition-terms on non-linear formulas


#1

Hi, I have the following problem, I would like to use the measurement error operator “me” in a non-linear formula, but it appears not possible as this kind of formula are directly passed to stan:

brm(bf(y ~ b1 * exp( b2 * me(x, x_sd) ), b1 + b2 ~ 1, nl = TRUE),
data = df, prior = …

produces a “no matches for” error

is there a workaround?

thanks


#2

Non-linear parameters are just placeholders for linear formulas. That is

bf(y ~ b1 * exp(b2), b1 ~ 1, b2 ~ 0 + me(x, s_sd))