Bayesian Statistics: Reopsitory of Programs/Codes
- "Two-headed" coin: bayes1_1.m
See Handout #1 (page 8) for descripton.
- Sampling from bivariate Normal-Inverse Gamma Posterior
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
- METROPOLIS: Matlab m-codes for several Metropolis examples.
The codes albertmc1.m,
illustrate Metropolis and Metropolis-Hastings Algorithm. Descriptions are
provided in Handout 10.
- Matlab m-codes for Handout 11.
The codes albertmc3.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
- Matlab m-codes for Handout 12.
illustrates the EM algorithm on Fisher genomic MLE, described in Rao.
is an example of EM treatment of mixtures. The solution is MLE and of course
illustrate Gibbs sampler in a mixture problem.
All programs are described in the handout.
To obtain normalized histograms you will need
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.
- Matlab m-codes for Handout 20 (Wavelets). StandAlone DWTR/IDWTR.
N-Dimensional WRAPPER written by our own Tarik and Bugra.
Wavelet Transform N-dim.
Wavelet Transform N-dim.
Make Wavelet Filter.
Illustration of Wavelet Transform, dwtr.
Link between wavelets and Fourier.
Function needed for demo3.m.
The program demo4.m
does hard (universal) thresholding.
The program demo5.m
does linear Bayes shrinkage.
ODC codes need BUGS to be properly previewed. With each ODC corresponding text file
Mathematica Notebook mathematic2.nb
Supporting Example: Binomial n from a single observation in
Mathematica Notebook cauchycredo.nb
Supporting Example: Credible Sets, Cauchy Bimodal Example
Mathematica Notebook hierarchical.nb
Supporting Example: Hierarchical Bayes, Elections.
Mathematica Notebook jeremy.nb
Supporting Example: Jeremy, the IQ freak!
Last Updated: September 15, 2004.
Back to the course main page.