This post presents exercises using the MCMCglmm package in order to compute parameter estimates in a Bayesian fashion, relying on Mark Chain Monte Carlo (MCMC) methods. The MCMCglmm package typically deals with Generalized Linear (Mixed) Models (GLMM). This package mainly uses Gibbs Sampling to update the parameters, but also the Metropolis-Hastings. Course notes are available […]

# Bayesian inference

## MCMC For Bayesian Inference – Gibbs Sampling: Exercises

In the last post, we saw that the Metropolis sampler can be used in order to generate a random sample from a posterior distribution that cannot be found analytically. Following the same idea, Gibbs sampling is a popular Markov Chain Monte Carlo (MCMC) technique that is more efficient, in general, since the updates of the […]

## MCMC for Bayesian Inference – Metropolis: Exercises

Previously, we introduced Bayesian Inference with R using the Markov Chain Monte Carlo (MCMC) techniques. The first set of exercises gave insights on the Bayesian paradigm, while the second set focused on well-known sampling techniques that can be used to generate a sample from the posterior distribution . While the next set of exercises will […]

## Basic Bayesian Inference for MCMC Techniques: Exercises (Part 2)

In the first part , we saw a small introduction of the Bayesian inference and a first approach of Monte-Carlo techniques. Now, we will get through the Monte Carlo in order to obtain a random sample from the posterior distribution using some common techniques. Then, the next post will present the well-known Metropolis(-Hastings), Gibbs sampler, […]

## Basic Bayesian Inference for MCMC techniques : Solutions (Part 1)

Below are the solutions to these exercises on “Bayesian Inference : introduction for MCMC techniques (part 1)”. ############### # # # Exercise 1 # # # ############### # a. Binomial distribution with n = 1000 and probability of ‘success’ = 735/1000 plot(dbinom(x = seq(1, 100, 1), size = 100, prob = 735/1000), type = "l", […]

## Basic Bayesian Inference for MCMC techniques : Exercises (Part 1)

This post aims to introduce you to the basics of Bayesian inference. The ultimate goal of this introductory set of exercises is to get you ready for Bayesian inference using Markov Chain Monte Carlo (MCMC). Little reminder The whole Bayesian paradigm is based on the Bayesian Theorem that we all know (right ?), generally formulated […]