So I am given data of y and x. I am told that
Now I need to implement a Metropolis-Hastings to update a and b and gibbs to update g.
I know how to go about updating g, but am uncertain to update a and b.
So I know that I need a proposed distribution, say a normal (a(t-1),5) and normal(b(t-1),5) where a(t-1) represents the previous iteration.
I am having trouble with my acceptance ratio, since the formula is based off of the posterior f(a|y) and f(b|y) (at least I think) which I am not sure how to calculate.
Any help would be appreciated. Thank you in advance.









Reply With Quote