Skip to content

In the first semester of my MSc. studies, we developed a phyton version of the Gibbs Sampler and Metropolis-Hastings Algorithm from the scratch. We described our results and analysis in a report.

License

Notifications You must be signed in to change notification settings

rodolformelo/Metropolis-Hastings-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metropolis-Hastings-Algorithm

For implementing Metropolis-Hastings algorithm simulated data were used with k=3 covariates and a constant term. A multivariate normal distribution was taken as a prior for formula, N(0,formula) where formula is a diagonal matrix with formula on the diagonal. After considering a number of values for formula, formula = 1 was chosen. The posterior distribution was simulated using as proposal a multivariate normal distribution centered at the current update of and with a covariance matrix given by the inverse of Fisher information evaluated at the current update.

Gibbs Sampler for binary data

For this analyse, we simulated N independent binary random variables where each yi comes from a Bernoulli distribution with probability of success formula.

About

In the first semester of my MSc. studies, we developed a phyton version of the Gibbs Sampler and Metropolis-Hastings Algorithm from the scratch. We described our results and analysis in a report.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages