Thanks a lot for your reply, Jesse. I’ve spent a lot of time trying to get this to work, but I can’t get CustomDist to take more than one output from the scan. I want to collect the mus and sigmas, much like in your first example, and used them for the standard log-likelihood function (pm.Normal) to compute the likelihood of the observations. I’ll try doing this using the model.register_rv method and post a solution here if I find one.
Edit: just wanted to emphasise that your response did at least help me to solve the problems that I was facing at the time, so thanks for that. Now I just need to solve the new set of problems…