Skip to content
/ gibbs Public

Programming a Gibbs sampler. Measures for convergence and autocorrelation are constructed. Anyone interested in what's happening behind the scenes of Bayesian statistics might find this interesting.

Notifications You must be signed in to change notification settings

Lion-Be/gibbs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Programming a Gibbs sampler

⭐ Purpose

This code consists of a programming exercise that I worked on in the first semester of my M.Sc. studies in Methodology and Statistics at the University of Utrecht. I manually compute a Gibbs sampler to construct posterior distributions in linear regression models.

Specifically, I

  • compute the OLS solution using linear algebra to derive starting values for sampling
  • run two separate MCMC chains sampling from the conditional posterior distribution of each parameter
  • construct measures for autocorrelation and convergence

💎 How can you use it?

This exercise was primary a programming task as part of my studies. However, it did come in handy for me when I needed a quick Gibbs sampler for Bayesian inference that does not need any Stan compilation.

About

Programming a Gibbs sampler. Measures for convergence and autocorrelation are constructed. Anyone interested in what's happening behind the scenes of Bayesian statistics might find this interesting.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages