Commit 8fc4f436 authored by chbauman's avatar chbauman
Browse files

non uniform prior

parent 3ce85ee3
......@@ -152,8 +152,8 @@ inline static PopMatrix mcmc(const ThetaVector & theta, const index_t rck, const
}
#else
particle_prop_likelihood = likelihood(particle_prop);
if(acc_dist(GEN) <= std::pow(particle_prop_likelihood / particle_likelihood, rho_curr) *
prior(particle_prop) / prior(particle)){
if(std::log(acc_dist(GEN)) <= (particle_prop_likelihood - particle_likelihood) * rho_curr +
prior(particle_prop) - prior(particle){
particle = particle_prop;
particle_likelihood = particle_prop_likelihood;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment