Crossed Random effect-DIM mismatch

Your likelihood is

concentration ~ lognormal(log(predicted_concentration), sigma);

I suspect the problem is that you’ve defined predicted_concentration as follows.

That allows it to take on any values in (-\infty, \infty). If you were to define it so that it takes on values only in (0, \infty), that might fix the problem.

 vector<lower=0>[N] predicted_concentration;
1 Like