To learn more about PyMC, please refer to the online user's guide.
PyMC is used for Bayesian modeling in a variety of fields. Here is a partial list of publications that cite PyMC in their work.
DisasterModel: A changepoint example, with several variations.
StraightLineFit: A two-parameter linear regression.
WeibullFit: Fitting the parameters of a Weibull distribution.
NormalFit: Fitting the parameters of a normal distribution.
VonMisesFit: Fitting the parameters of a Von Mises distribution.
GelmanBioassay: From section 3.7 of Bayesian Data Analysis by Gelman et al., 2nd ed.
CustomStep: An example of a custom step method.
Manatee iPython Notebook demonstrating how to estimate the proportional causes of mortality for manatees.
LatentOccupancy Simple occupancy model using latent states
Recovery Waterfowl band recovery model
Price Simple pricing model
Pump Hierarchical Poisson failure rates
Surplus Fisheries surplus production model
Salamanders Salamander occupancy estimation model
Probit Simple probit regression model
ExponentialSurvival Exponential model for melanoma survival data
Zero-inflated poisson model Zero-inflated Poisson example using simulated data.
For users familiar with BUGS, here are a few examples that are translated directly from BUGS models; the original code is included in each file as a docstring:
Koala Koala sighting model (from Link & Barker 2009)
Mt Conditional multinomial mark-recapture model (from Link & Barker 2009)
Mt2 Unconditional multinomial mark-recapture model (apparently not possible in BUGS)
BayesFactor Simple example of Bayes factor calculation
Mean: Creates a mean function.
Covariance: Creates a covariance function.
Realizations: Draws several realizations.
Observations: Observes a mean and covariance, then draws several realizations.
BasisCov: Creates a covariance from a basis with normally-distributed coefficients.
GPMCMC: Creates a PyMC model containing a Gaussian process, and fits it with MCMC.
Non-parametric regression: iPython Notebook of NP regression using GP
Examples of use of John Salvatier's
multichain_mcmc package: https://github.com/jsalvatier/multichain_mcmc/tree/master/multichain_mcmc/examples
Examples for John's
gradient_samplers package: https://github.com/jsalvatier/gradient_samplers/tree/master/gradient_samplers/examples
Abraham Flaxman's blog contains numerous PyMC examples, both for standard statistics and unusual applications, with code snippets: http://healthyalgorithms.wordpress.com/tag/pymc/
Whit Armstrong's comparison of PyMC with other packages for Gelman et al.'s radon dataset: https://github.com/armstrtw/pymc_radon
Estimation of Bayes Factors using PyMC: http://stronginference.com/weblog/2010/12/16/estimating-bayes-factors-using-pymc.html
Last edited by Chris Fonnesbeck,