Shape Parameter for Multiple Treatment Groups

Thanks for the response! Almost there but not quite, the final line with the likelihood is now providing the error. I’m generating the fake data like so:

count_data = pd.DataFrame({
 "n": np.random.poisson(lam = 15, size = 74*3),
 "person_id": np.repeat([0,1,2], 74)
})

and get a ValueError: Input dimension mis-match. (input[0].shape[1] = 222, input[1].shape[1] = 3) As a reminder I’m using 3 people, each with 74 items of data.

and as above, the likelihood function is

 observation = pm.Poisson("obs", mu=lambda_[count_data['person_id']], observed=count_data['n'])