Hi,
I’m trying to replicate someone else’s work with PyMC before switching to more modern sampling.
They use a block random-walk metropolis hastings algorithm. Is this possible to do with PyMC at all?
For a simple example, consider a model that is a composition of an AR(1) and an MA(1):
loglik(theta) = omega * loglik_ar(theta1) + (1 - omega) * loglik_ma(theta2).
Where theta = (rho, beta, sigma, omega), theta1 = (rho, sigma), theta2 = (beta, sigma).
I’d like to sample with RWMH with the hessian at the mode as the proposal varcov and 3 blocks of paramters: [rho, beta], [sigma] and [omega].
I realize this is a somewhat trivial example. There are more complex models involved where the blocks have more meaning.
The exercise I’m doing is whether or how much it is to be gained from switching to e.g. NUTS.
Edit: In addition, is there a way to target/tune for a specific acceptance rate?
Maybe I’m looking in the wrong places, but couldn’t find that much info about Metropolis samplers in the docs.