metropolis-hastings

  1. M

    Long run distribution

    I have been worked out a transition matrix of a Markov chain using the Metropolis algorithm, and now have to use R in order to show that it has the required long run distribution. I am new to R so im not sure if this is on the right track: > A= matrix(c(.75, .6, .5, .1, .1, .1, .15, .3, .4)...
  2. J

    How to apply MCMC/Metropolis Hastings with a constraint

    I have 4 random variables, say A,B,C and D and some data X. I can obtain the conditional pdfs P(A|B,C,D,X),..., P(D|A,B,C,X) up to proportionality. I would like to sample from the joint pdf P(A,B,C,D|X). This can easily be done via metropolis hastings. However I wish to also have the...
  3. J

    Independent Metropolis Hastings, not jumping

    I'm trying to sample from a posterior (with 50 dimensions) and I've got a proposal distribution which gives a overall acceptance rate of 0.3. However when I take 20000 draws, there are a couple occasions where the proposal is rejected 500-1000 times consecutively. I haven't much experience in...
  4. B

    Confused: Metropolis-Hastings, its variations and the Hastings correction ratio

    Hello everyone, Over the past few weeks I have been studying MCMC and Metropolis-Hastings algorithms. Unfortunately I am stuck and confused with the different variations of the algorithm when I try to practically implement it with code. I was looking for some code examples online but the more I...