I was able to get the model running in JAGS. Gave up on implementing it in PyMC3. Thanks a lot for your help throughout.