Hi,

I would like to create a model in PyMC3 to sample the posterior using multiple observations which share the same priors and likelihood model. What would be the best way of doing this?

To start, I should provide the basis for this work. So the idea here is that we have made measurements with two detectors (say Det1 and Det2) and they each provide a spectrum which is basically a vector of 90 numbers. The linear model that relates the measured spectrum (M) to the response matrix ( R ) and the incident spectrum ( P - prior ) is given as follows:

M_{det1} = R_{det1,P1} * P1 + R_{det1,P2} * P2

M_{det2} = R_{det2,P1} * P1 + R_{det2,P2} * P2

I have measurements M_{det1} and M_{det2}, as well as, R_{det1,P1}, R_{det1,P2}, R_{det2,P1}, and R_{det2,P2}.

What would be best way to specify this model? Something like Model 1 in this post (Gaussian Mixture of regression)?

Thanks for your help.