Sampling functions# Expand for references to pymc.sample Bayesian Additive Regression Trees: Introduction / Biking with BART Bayesian Additive Regression Trees: Introduction / Coal mining with BART Bayesian Additive Regression Trees: Introduction / Biking with BART / Out-of-Sample Predictions / Regression Bayesian Additive Regression Trees: Introduction / Biking with BART / Out-of-Sample Predictions / Time Series Quantile Regression with BART / Asymmetric Laplace distribution Bayesian Estimation Supersedes the T-Test / Example: Drug trial evaluation Generalized Extreme Value Distribution / Inference LKJ Cholesky Covariance Priors for Multivariate Normal Models Bayesian Missing Data Imputation / Bayesian Imputation Bayesian Missing Data Imputation / Bayesian Imputation by Chained Equations / PyMC Imputation Modeling Heteroscedasticity with BART / Model Specification Introduction to Bayesian A/B Testing / Bernoulli Conversions / Data Introduction to Bayesian A/B Testing / Generalising to multi-variant tests Introduction to Bayesian A/B Testing / Value Conversions Estimating parameters of a distribution from awkwardly binned data / Example 2: Parameter estimation with the other set of bins / Model specification Estimating parameters of a distribution from awkwardly binned data / Example 6: A non-normal distribution / Model specification Estimating parameters of a distribution from awkwardly binned data / Example 3: Parameter estimation with two bins together / Model Specification Estimating parameters of a distribution from awkwardly binned data / Example 4: Parameter estimation with continuous and binned measures / Model Specification Estimating parameters of a distribution from awkwardly binned data / Example 5: Hierarchical estimation / Model specification Estimating parameters of a distribution from awkwardly binned data / Example 1: Gaussian parameter estimation with one set of bins / Model specification Using a “black box” likelihood function (numpy) / Comparison to equivalent PyMC distributions Using a “black box” likelihood function (numpy) / Introduction Using a “black box” likelihood function (numpy) / PyTensor Op with grad Using a “black box” likelihood function (numpy) / PyTensor Op without grad Factor analysis / Model / Alternative parametrization Factor analysis / Model / Direct implementation Hierarchical Partial Pooling / Approach NBA Foul Analysis with Item Response Theory / Sampling and convergence Bayesian mediation analysis / Define the PyMC3 model and conduct inference Bayesian mediation analysis / Double check with total effect only model Does the effect of training upon muscularity decrease with age? / Define the PyMC model and conduct inference A Primer on Bayesian Methods for Multilevel Modeling / Adding group-level predictors A Primer on Bayesian Methods for Multilevel Modeling / Conventional approaches A Primer on Bayesian Methods for Multilevel Modeling / Adding group-level predictors / Correlations among levels A Primer on Bayesian Methods for Multilevel Modeling / Non-centered Parameterization A Primer on Bayesian Methods for Multilevel Modeling / Partial pooling model A Primer on Bayesian Methods for Multilevel Modeling / Varying intercept and slope model A Primer on Bayesian Methods for Multilevel Modeling / Varying intercept model Probabilistic Matrix Factorization for Making Personalized Recommendations / Probabilistic Matrix Factorization Model building and expansion for golf putting / A new model Model building and expansion for golf putting / Fitting the distance angle model Model building and expansion for golf putting / Fitting the model on the new data Model building and expansion for golf putting / Logit model Model building and expansion for golf putting / Geometry-based model / Prior Predictive Checks Fitting a Reinforcement Learning Model to Behavioral Data with PyMC / Estimating the learning parameters via PyMC / Alternative model using Bernoulli for the likelihood Fitting a Reinforcement Learning Model to Behavioral Data with PyMC / Estimating the learning parameters via PyMC Reliability Statistics and Predictive Calibration / Bayesian Modelling of Reliability Data / Direct PYMC implementation of Weibull Survival A Hierarchical model for Rugby prediction / Building of the model Splines / The model / Fit the model Stochastic Volatility model / Fit Model How to wrap a JAX function for use in PyMC / Wrapping the JAX function in PyTensor / Sampling with PyMC Difference in differences / Bayesian difference in differences / Inference Counterfactual inference: calculating excess deaths due to COVID-19 / Inference Interrupted time series analysis / Inference Regression discontinuity design analysis / Inference Bayes Factors and Marginal Likelihood / Savage-Dickey Density Ratio Sampler Statistics / Multiple samplers Sampler Statistics Kronecker Structured Covariances / LatentKron / Example 1 Gaussian Processes: Latent Variable Implementation / Example 1: Regression with Student-T distributed noise / Coding the model in PyMC Gaussian Processes: Latent Variable Implementation / Example 2: Classification Inference Binomial regression / Binomial regression model Hierarchical Binomial Model: Rat Tumor Example / Computing the Posterior using PyMC GLM: Negative Binomial Regression / Negative Binomial Regression / Create GLM Model Out-Of-Sample Predictions / Define and Fit the Model GLM: Poisson Regression / Poisson Regression / 1. Manual method, create design matrices and manually specify model Setup / 5. Linear Model with Custom Likelihood to Distinguish Outliers: Hogg Method / 5.2 Fit Model / 5.2.1 Sample Posterior Setup / 4. Simple Linear Model with Robust Student-T Likelihood / 4.2 Fit Model / 4.2.1 Sample Posterior Setup / 3. Simple Linear Model with no Outlier Correction / 3.2 Fit Model / 3.2.1 Sample Posterior GLM: Robust Linear Regression / Robust Regression / Normal Likelihood Rolling Regression / Rolling regression Rolling Regression Simpson’s paradox and mixed models / Model 1: Basic linear regression / Do inference Simpson’s paradox and mixed models / Model 2: Independent slopes and intercepts model Simpson’s paradox and mixed models / Model 3: Hierarchical regression Bayesian regression with truncated or censored data / Run the truncated and censored regressions Bayesian regression with truncated or censored data / The problem that truncated or censored regression solves General API quickstart / 3. Inference / 3.2 Analyze sampling results General API quickstart / 4. Posterior Predictive Sampling General API quickstart / 4.1 Predicting on hold-out data General API quickstart / 3. Inference / 3.1 Sampling How to debug a model / Introduction / Bringing it all together How to debug a model / Introduction / Troubleshooting a toy PyMC model Lasso regression with block updating Using ModelBuilder class for deploying PyMC models / Standard syntax Compound Steps in Sampling / Compound steps Compound Steps in Sampling / Compound steps by default Compound Steps in Sampling / Order of step methods Compound Steps in Sampling / Specify compound steps Dirichlet process mixtures for density estimation / Dirichlet process mixtures Gaussian Mixture Model ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / DE MetropolisZ Sampler ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / DEMetropolis Sampler ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Bayesian Inference with Gradients / Simulate with Pytensor Scan / Inference Using NUTs ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / Metropolis Sampler ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Bayesian Inference with Gradients / PyMC ODE Module / NUTs Inference ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / Slice Sampler DEMetropolis and DEMetropolis(Z) Algorithm Comparisons / Helper Functions / Sampling DEMetropolis(Z) Sampler Tuning / Conclusions DEMetropolis(Z) Sampler Tuning / Helper Functions / Sampling Work flow / Step 4: Draw MCMC samples from the posterior using MLDA Censored Data Models / Censored data models / Model 1 - Imputed Censored Model of Censored Data Censored Data Models / Censored data models / Model 2 - Unimputed Censored Model of Censored Data Censored Data Models / Uncensored Model Bayesian Survival Analysis / Bayesian proportional hazards model Bayesian Survival Analysis / Bayesian proportional hazards model / Time varying effects Reparameterizing the Weibull Accelerated Failure Time Model / Parameterization 1 Reparameterizing the Weibull Accelerated Failure Time Model / Parameterization 2 Reparameterizing the Weibull Accelerated Failure Time Model / Parameterization 3 Analysis of An AR(1) Model in PyMC Analysis of An AR(1) Model in PyMC / Extension to AR(p) Air passengers - Prophet-like model / Part 1: linear trend Air passengers - Prophet-like model / Part 2: enter seasonality Forecasting with Structural AR Timeseries / Complicating the Picture / Specifying a Trend Model Forecasting with Structural AR Timeseries / Specifying the Model Forecasting with Structural AR Timeseries / Complicating the picture further / Specifying the Trend + Seasonal Model Forecasting with Structural AR Timeseries / Complicating the Picture / Wrapping our model into a function Multivariate Gaussian Random Walk / Model Bayesian Vector Autoregressive Models / Handling Multiple Lags and Different Dimensions GLM: Mini-batch ADVI on hierarchical regression model Empirical Approximation overview / 2d density Empirical Approximation overview / Multimodal density Introduction to Variational Inference with PyMC / Basic setup Introduction to Variational Inference with PyMC / Distributional Approximations Expand for references to pymc.sample_posterior_predictive Bayesian Additive Regression Trees: Introduction / Biking with BART / Out-of-Sample Predictions / Regression Bayesian Additive Regression Trees: Introduction / Biking with BART / Out-of-Sample Predictions / Time Series Quantile Regression with BART / Asymmetric Laplace distribution Bayesian Missing Data Imputation / Bayesian Imputation Bayesian Missing Data Imputation / Hierarchical Structures and Data Imputation Bayesian Missing Data Imputation / Bayesian Imputation by Chained Equations / PyMC Imputation Modeling Heteroscedasticity with BART / Model Specification Estimating parameters of a distribution from awkwardly binned data / Example 1: Gaussian parameter estimation with one set of bins / Checks on model Estimating parameters of a distribution from awkwardly binned data / Example 5: Hierarchical estimation / Posterior predictive checks Estimating parameters of a distribution from awkwardly binned data / Example 6: A non-normal distribution / Posterior predictive checks Estimating parameters of a distribution from awkwardly binned data / Example 3: Parameter estimation with two bins together / Posterior predictive checks Estimating parameters of a distribution from awkwardly binned data / Example 4: Parameter estimation with continuous and binned measures / Posterior predictive checks Estimating parameters of a distribution from awkwardly binned data / Example 2: Parameter estimation with the other set of bins / Posterior predictive checks A Primer on Bayesian Methods for Multilevel Modeling / Adding group-level predictors / Prediction Model building and expansion for golf putting / A new model Model building and expansion for golf putting / Fitting the distance angle model Model building and expansion for golf putting / Logit model Reliability Statistics and Predictive Calibration / Bayesian Modelling of Reliability Data / Direct PYMC implementation of Weibull Survival A Hierarchical model for Rugby prediction / Results Splines / The model / Fit the model Stochastic Volatility model / Fit Model Difference in differences / Bayesian difference in differences / Posterior prediction Counterfactual inference: calculating excess deaths due to COVID-19 / Counterfactual inference Counterfactual inference: calculating excess deaths due to COVID-19 / Posterior predictive check Interrupted time series analysis / Counterfactual inference Interrupted time series analysis / Posterior predictive check Regression discontinuity design analysis / Counterfactual questions Bayes Factors and Marginal Likelihood / Bayes factors and inference Kronecker Structured Covariances / LatentKron / Example 1 Gaussian Processes: Latent Variable Implementation / Example 2: Classification Gaussian Processes: Latent Variable Implementation / Example 1: Regression with Student-T distributed noise / Prediction using .conditional Interpreting the results Out-Of-Sample Predictions / Generate Out-Of-Sample Predictions Out-Of-Sample Predictions / Model Decision Boundary Simpson’s paradox and mixed models / Model 2: Independent slopes and intercepts model / Visualisation Simpson’s paradox and mixed models / Model 1: Basic linear regression / Visualisation Simpson’s paradox and mixed models / Model 3: Hierarchical regression / Visualise General API quickstart / 4. Posterior Predictive Sampling General API quickstart / 4.1 Predicting on hold-out data Using ModelBuilder class for deploying PyMC models / Standard syntax Old good Gaussian fit Air passengers - Prophet-like model / Part 1: linear trend Air passengers - Prophet-like model / Part 2: enter seasonality Forecasting with Structural AR Timeseries / Prediction Step Forecasting with Structural AR Timeseries / Complicating the Picture / Specifying a Trend Model Forecasting with Structural AR Timeseries / Specifying the Model Forecasting with Structural AR Timeseries / Complicating the picture further / Specifying the Trend + Seasonal Model Forecasting with Structural AR Timeseries / Complicating the Picture / Wrapping our model into a function Multivariate Gaussian Random Walk / Model Bayesian Vector Autoregressive Models / Adding a Bayesian Twist: Hierarchical VARs Bayesian Vector Autoregressive Models / Handling Multiple Lags and Different Dimensions Variational Inference: Bayesian Neural Networks / Lets look at what the classifier has learned Variational Inference: Bayesian Neural Networks / Bayesian Neural Networks in PyMC / Variational Inference: Scaling model complexity Expand for references to pymc.sample_prior_predictive Generalized Extreme Value Distribution / Prior Predictive Checks Bayesian Missing Data Imputation / Bayesian Imputation Bayesian Missing Data Imputation / Hierarchical Structures and Data Imputation Bayesian Missing Data Imputation / Bayesian Imputation by Chained Equations / PyMC Imputation Introduction to Bayesian A/B Testing / Bernoulli Conversions / Prior predictive checks Introduction to Bayesian A/B Testing / Value Conversions A Primer on Bayesian Methods for Multilevel Modeling / Conventional approaches Model building and expansion for golf putting / Geometry-based model / Prior Predictive Checks Reliability Statistics and Predictive Calibration / Bayesian Modelling of Reliability Data / Direct PYMC implementation of Weibull Survival Splines / The model / Fit the model Stochastic Volatility model / Checking the model Counterfactual inference: calculating excess deaths due to COVID-19 / Prior predictive check Interrupted time series analysis / Prior predictive check Bayes Factors and Marginal Likelihood / Savage-Dickey Density Ratio Using ModelBuilder class for deploying PyMC models / Standard syntax ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Bayesian Inference with Gradients / Simulate with Pytensor Scan / Check Time Steps Air passengers - Prophet-like model / Part 1: linear trend Air passengers - Prophet-like model / Part 2: enter seasonality Forecasting with Structural AR Timeseries / Complicating the Picture / Specifying a Trend Model Forecasting with Structural AR Timeseries / Specifying the Model Forecasting with Structural AR Timeseries / Complicating the picture further / Specifying the Trend + Seasonal Model Forecasting with Structural AR Timeseries / Complicating the Picture / Wrapping our model into a function Bayesian Vector Autoregressive Models / Adding a Bayesian Twist: Hierarchical VARs Bayesian Vector Autoregressive Models / Handling Multiple Lags and Different Dimensions Samplers# Expand for references to pymc.NUTS Sampler Statistics DEMetropolis and DEMetropolis(Z) Algorithm Comparisons / Experiment #3. Accuracy and Bias / 10 Dimensions DEMetropolis and DEMetropolis(Z) Algorithm Comparisons / Experiment #1. 10-Dimensional Target Distribution DEMetropolis and DEMetropolis(Z) Algorithm Comparisons / Experiment #2. 50-Dimensional Target Distribution DEMetropolis and DEMetropolis(Z) Algorithm Comparisons / Experiment #3. Accuracy and Bias / 50 Dimensions GLM: Mini-batch ADVI on hierarchical regression model Expand for references to pymc.Metropolis Sampler Statistics / Multiple samplers How to debug a model / Introduction / Troubleshooting a toy PyMC model Lasso regression with block updating Compound Steps in Sampling / Compound steps Compound Steps in Sampling / Specify compound steps ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / Metropolis Sampler Work flow / Step 4: Draw MCMC samples from the posterior using MLDA Expand for references to pymc.Slice Lasso regression with block updating ODE Lotka-Volterra With Bayesian Inference in Multiple Ways / Gradient-Free Sampler Options / Slice Sampler