Thank you for your response!
I tried this already before but when I adjust the code after the lines you posted like this:
diff_adapt = pm.Deterministic("adaptation_diff", adaptation_diff * adaptation[exp_idx])
p = pm.Deterministic('p', pm.math.sigmoid(intercept[exp_idx] + diff_adapt + level*levelscale[exp_idx]))
n_os = pm.Binomial('respone',n=nr, p=p, observed = nr_o, dims='obs_id')
the model compiles but when sampling I get the ValueError: Input dimension mismatch. One other input has shape[0] = 1650, but input[1].shape[0] = 60. (I have 1650 observations and 60 participants).
I also tried with different versions of adaptation[exp_idx] without any index and with adaptation[exp_idx,participant] but doesn’t work either.
If I don’t specify the dims of the code that follows at all I get the AssertionError: Could not broadcast dimensions even before sampling.