I’ve just released a small bit of Matlab code on GitHub which helps automate the job of plotting posterior predictive distributions. If you are inferring posterior distributions of parameters of a 1D function (e.g. y=mx+c) then this code will plot the posterior predictive distribution for you.

This should be handy for you to eyeball how well a model fits data, and should help in producing your publication quality figures.

Obviously, you can use whatever 1D function you want, and it should work with functions with any number of parameters. You just need to specify a handle to your function… but go see the GitHub repository for the details.

I’m a little new to Object Oriented Programming, and it’s early release code, but it seems to do the job. Please send bug reports, feature requests by creating a GitHub issue.

demo

Go get the code here https://github.com/drbenvincent/posterior-prediction-plot-matlab

Leave a comment

Leave a Reply