This is a short tutorial introducing the principles of MCMC methodology using R examples. It covers the motivations for the Metropolis-Hastings algorithm and Gibbs Sampler, credible sets and two more involved examples.
The tutorial is merely giving an impression on how to implement the aforementioned algorithms. It corresponds to the lecture held at University of Vienna in 2020/21.
The used data has been gathered from Kaggle and FiveThirtyEight. It can be accessed here and here.
A detailed derivation, thorough discussion and a plethora of exercises and examples is given in Robert & Casella (2004): Monte Carlo Statistical Methods.