Results 1 to 6 of 6

Thread: Metropolis Hastings

Threaded View

  1. #1
    Points: 993, Level: 16
    Level completed: 93%, Points required for next Level: 7

    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Metropolis Hastings

    So I am given data of y and x. I am told that
    y_i|g_i, x_i \mbox{ follows a poisson}(g_ix_i)
    g_i|a, b \mbox{ follows a gamma}(a,b)
    a \mbox{ follows a gamma}(1,1)
    b \mbox{ follows a gamma}(10,1)

    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.
    Last edited by Dason; 05-04-2011 at 07:17 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats