Code Monkey home page Code Monkey logo

dbda-python's Introduction

Bayesian Data Analysis - Python/PyMC

This repository contains Python/PyMC code designed as an introduction for those familiar with introductory statistical concepts, likely from a null hypothesis significance testing (NHST) perspective. The code began life as a python implementation of models/figures from the book Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan, Second Edition, by John Kruschke (2015), but has meandered a bit since then. Given the age of that book and the ever-advancing development of PyMC (and Bayesian modeling more generally), attempting to faithfully reproduce the book's models has seemed less and less useful. It is hoped that any discrepancies between the models found here and those originally specified in the book represent progress.

The datasets used in this repository have been retrieved from the book's website. Note that, this repository is not a standalone tutorial and will be far more helpful with guidance (e.g., Kruschke's book). Questions, suggestions for improvement, and/or help with further development of the notebooks are always welcome!

Notebooks

Chapter 5 - Bayes' Rule
Chapter 6 - Inferring a Binomial Probability via Exact Mathematical Analysis
Chapter 7 - Markov Chain Monte Carlo
Chapter 9 - Hierarchical Models
Chapter 10 - Model Comparison and Hierarchical Modelling
Chapter 16 - Metric-Predicted Variable on One or Two Groups
Chapter 17 - Metric-Predicted Variable with One Metric Predictor
Chapter 18 - Metric Predicted Variable with Multiple Metric Predictors
Chapter 19 - Metric Predicted Variable with One Nominal Predictor
Chapter 20 - Metric Predicted Variable with Multiple Nominal Predictor
Chapter 21 - Dichotomous Predicted Variable
Chapter 22 - Nominal Predicted Variable
Chapter 23 - Ordinal Predicted Variable
Chapter 24 - Count Predicted Variable

Other notebooks:
Posterior Predictive Checking
Bayes' Factors

Libraries used/required:

  • pymc
  • arviz
  • pandas
  • numpy
  • scipy
  • matplotlib
  • seaborn

Related References:

Kruschke, J.K. (2015), Doing Bayesian Data Analysis: A Tutorial with R, JAGS, and Stan, Second Edition, Academic Press / Elsevier, https://sites.google.com/site/doingbayesiandataanalysis/

Kruschke, J.K. & Liddell, T.M. (2017), The Bayesian New Statistics: Hypothesis testing, estimation, meta-analysis, and power analysis from a Bayesian perspective, Psychonomic Bulletin & Review, http://dx.doi.org/10.3758/s13423-016-1221-4

Kruschke, J.K. & Liddell, T.M. (2017), Bayesian data analysis for newcomers, Psychonomic Bulletin & Review, http://dx.doi.org/10.3758/s13423-017-1272-1

Salvatier J, Wiecki TV, Fonnesbeck C. (2016), Probabilistic programming in Python using PyMC3, PeerJ Computer Science 2:e55, https://doi.org/10.7717/peerj-cs.55
PyMC3 - http://pymc-devs.github.io/pymc3/

Note:

The repository below contains python code for the first edition of the book. The code in that repository is a much more direct implementation of the R/JAGS code from the book than you will find here.

https://github.com/aloctavodia/Doing_bayesian_data_analysis

dbda-python's People

Contributors

cluhmann avatar jwarmenhoven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.