my question concerns the logp function in the PYMC package in Python. Ultimately I want to calculate a quantity that goes by many names, namely the Bayes-factor/ evidence/ marginal-likelihood of the model, but perhaps first demystifying logp will get me closer.
Let us assume that I have instantiated the model below
mc = MCMC(myModel)
and have then done my sampling.
What does calling the logp exactly return?
Is it the log-posterior for the last sample? and if so, how can I access the log-posterior value for other samples generated by the MCMC process? (Any hints on how to use this for calculating the marginal likelihood welcome!!!)
Thank you all for your time, N.