Introduction - If you have any usage issues, please Google them yourself
This program develops a very basic example, for the sampling of functions by means of Metropolis algorithm; showing the correlograms and the histogram of the generated samples. metropolis_hastings.m. This file contains four examples, for the sampling of complex functions by means of Metropolis-Hastings algorithm, showing the correlograms and the histograms of the generated samples. In this case the proposals PDF its no longer symmetric. Additionally, the burn-in period, the lag period and the Geweke test have been implemented.It needs the "MH_routine.m" function.
metropolis_hastings2.m. This file contains one example, for the sampling of a bivariate Gaussian PDF by means of Metropolis-Hastings algorithm, showing the correlograms and the histograms of the generated samples, and the function with its contours and marginals PDF. Additionally, the burn-in period, the lag period and the Geweke test have been implemented.