21.01.2015 Views

Metropolis-Hastings algorithm

Metropolis-Hastings algorithm

Metropolis-Hastings algorithm

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Visualization of <strong>Metropolis</strong> <strong>algorithm</strong> in 1D<br />

• R code for excellent visualization i of the <strong>Metropolis</strong> <strong>algorithm</strong><br />

for a 1D problem at:<br />

– http://www.r-bloggers.com/visualising-the-metropolis-hastings<strong>algorithm</strong>/<br />

– Minor modifications, code saved as: Chivers_ms_viz.R<br />

<strong>Metropolis</strong><br />

s-<strong>Hastings</strong><br />

Trace<br />

rm(x, target_mu, target_sd)<br />

dnor<br />

-3 -2 -1 0 1 2 3<br />

x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!