Bayesian analysis with Python - simple
Here is an illustration on a Hierarchical Poisson failure rates from Clark and Gelfand
, using Python and the PyMC
package.
The Python code is as simple as the R code, although it is obviously more object-oriented. The main part are highlighted below. These are in fact where we specify the prior distributions:
Running the model:
Reference:
- PyMC3
- Clark, J.S. and Gelfand, A. (2006). Hierarchical modelling for the environmental sciences: statistical methods. Oxford university Press
My site is free of ads and trackers. Was this post helpful to you? Why not
Disqus is great for comments/feedback but I had no idea it came with these gaudy ads.