Python/PyMC3 versions of the programs described in Doing bayesian data analysis by John K. Kruschke
Jupyter Notebook Python
Permalink
Failed to load latest commit information.
Figures use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
IPython update Apr 22, 2015
02_SimpleGraph.py update import pymc3 Mar 12, 2015
03_IntegralOfDensity.py first upload Jul 4, 2014
03_RunningProportion.py first upload Jul 4, 2014
04_BayesUpdate.py first upload Jul 4, 2014
05_BernBeta.py change to the function HDIofICDF from the book Sep 11, 2014
05_BetaPosteriorPredictions.py first upload Jul 4, 2014
06_BernGrid.py minor style fix Sep 11, 2014
07_BernBetaPyMCFull.py use PyMC3 plot posterior and minor fixes May 27, 2016
07_BernMetropolisTemplate.py new and update Jul 10, 2014
08_BernTwoGrid.py now with HDI contour! Jul 15, 2014
08_BernTwoMetropolis.py renamed Jul 10, 2014
08_BernTwoPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 27, 2016
09_BernBetaMuKappaPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 27, 2016
09_BernBetaMuKappaPyMC_TT.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 27, 2016
09_FilconPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 27, 2016
09_FilconPyMC_ex9.2.A.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
09_FilconPyMC_ex9.2.B.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
10_BernBetaModelCompPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
10_FilconModelCompPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
10_ToyModelCompPyMC.py update import pymc3 Mar 12, 2015
12_OneOddGroupModelComp.py spelling fix Apr 29, 2015
13_minNforHDIpower.py add example to reproduce table 13.2 from the book Sep 11, 2014
15_SystemsPyMC.py update import pymc3 Mar 12, 2015
15_YmetricXsinglePyMC.py update import pymc3 Mar 12, 2015
16_SimpleLinearRegressionPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
16_SimpleRobustLinearRegressionPyMC.py update import pymc3 Mar 12, 2015
17_MultiLinRegressHyperPyMC.py update import pymc3 Mar 12, 2015
17_MultipleLinearRegressionPyMC.py update import pymc3 Mar 12, 2015
18_ANOVAonewayNonhomogvarBrugs.py add sum-to-zero constraint May 5, 2015
18_ANOVAonewayPyMC.py add sum-to-zero constraint May 5, 2015
19_ANOVAtwowayPyMC.py use PyMC3's plot_posterior, remove thinning and other minor fixes May 28, 2016
Guber1999data.txt new datasets Nov 16, 2014
HDI_of_grid.py function to compute HDI from a grid Jul 15, 2014
HDIofICDF.py remove intermediate variable add inline comments Sep 19, 2014
HtWtDataGenerator.py fix reference to Kruschke Oct 1, 2014
McDonaldSK1991data.txt update Dec 6, 2014
McIntyre1994data.csv new Nov 5, 2014
QianS2007SeaweedData.txt new data May 5, 2015
README.md update Apr 22, 2015
Salary.csv new data May 5, 2015
SolariLS2008data.txt update Dec 6, 2014
Systems.txt new Sep 30, 2014
hpd.py accidentally deleted yesterday Sep 11, 2014
plot_post.py remove y axis from plots Apr 30, 2015

README.md

Doing_bayesian_data_analysis

Gitter

This repository contains the Python version of the R programs described in the great book Doing bayesian data analysis (first edition) by John K. Kruschke (AKA the puppy book).

All the code is adapted from the Kruschke's book, except hpd.py that is taken (without modifications) from the PyMC project.

The name of the programs are the same used in the book, except they begin with a number indicating the chapter. All programs are written in Python and instead of BUGS/JAGS the PyMC3 module is used.

Thanks to Brian Naughton the code is also available as an IPython notebook