 MATLAB Codes

• "Two-headed" coin: bayes1_1.m See Handout #1 (page 8) for descripton.
• Sampling from bivariate Normal-Inverse Gamma Posterior nig1.m The analytic expression for the posterior is known but the sampling is done to illustrate how to sample from a bivariate distribution if marginal distribution of one parameter and the conditional distribution of the second, given the first, are given and easy to sample from.
• To run this sampling you will need more extensive library of random number generators than it is provided in matlab. One such is NPLab.zip. This matlab suite was used to teach Nonparametric Statistics (ISyE6404) at Tech. Expand the zip file in your matlab/toolbox/ as NPLab directory and put NPLab and subdirectories on your matlab path (check matlab/toolbox/local/pathdef.m). The suite BayesLab is under development.
• Multivariate Normal/Multivariate Normal Case: Student Scores Data from Mardia, Kent, and Bibby (1978) Multivariate Statistics book. Matlab code is: bayes6_1.m Program is used in HANDOUT6 for illustration of MVN/MVN model and related figure. Data are part of the m-file.
• Matlab m-code for comparing the Empirical Bayes estimators of Poisson mean $\theta$. Two estimators parametric and nonparametric are compared with the MLE. The code eb.m is annotated.
• METROPOLIS: Matlab m-codes for several Metropolis examples. The codes albertmc1.m, albertmc2.m, and metro2.m illustrate Metropolis and Metropolis-Hastings Algorithm. Descriptions are provided in Handout 10.
• Matlab m-codes for Handout 11. The codes albertmc3.m, mcmc2.m, and slice.m illustrate Gibbs sampler and Different models. Codes will be annotated and descriptions are provided in Handout 11. To run albertmc3.m you will need truncated normal simulator rand_nort.m
• Matlab m-codes for Handout 12. emexample.m illustrates the EM algorithm on Fisher genomic MLE, described in Rao. mixture_cla.m is an example of EM treatment of mixtures. The solution is MLE and of course not Bayesian. gibbs.m illustrate Gibbs sampler in a mixture problem. All programs are described in the handout. To obtain normalized histograms you will need histo.m taken from STIXBOX.
• Matlab m-codes for Handout 16. ising2.m Realization of Binary Markov Random Field by Metropolis; ising3.m Realization of Binary Markov Random Field by Gibbs Sampler ising4.m Realization of Anisotropic Binary Markov Random Field mcmc7.m MRF in Image Denoising (1) mcmc71.m MRF+Ising Prior in Image Denoising (2) lettera.bmp Letter A in BMP gt.bmp Georgia Tech (GT) in BMP.