Blog
In search of the best thermos for mate with Thomas Bayes
Aug 14, 2025
A few weeks ago, I saw a post on X where a farmer described an experiment to measure the heat retention of several thermoses. Can Bayesian statistics reveal the best one?

When to fix the intercept
Aug 12, 2025
I was modeling a case where I knew Y at X = 0, forcing me to choose between giving the intercept a strong prior or fixing it. Too lazy to do the math by hand, I used a computational approach to check if that choice made sense.

Data simulation with PyMC
Nov 1, 2024
Parameter recovery studies are crucial for assessing whether a model can accurately recover the true values of its parameters.
In this post, I'll walk through a series of increasingly complex examples showing how to simulate data with PyMC in the context of such a study.

How to create a custom family in Bambi?
Jan 14, 2023
Bambi now allows you to define custom statistical families in addition to its built-in distributions.
This post illustrates the process with the Zero-Inflated Poisson (ZIP) distribution,
showing how to implement it as a new family in Bambi and use it to simulate data, fit models, and assess their performance.

Let's use tidypolars more
Jun 26, 2022
In this blogpost I'm going to show how to perform the same task with pandas, the most popular library for data analysis in Python,
and tidypolars, a new library to do data analysis with tabular data inspired on the tidyverse.

Hierarchical modeling with the LKJ prior in PyMC
Jun 12, 2022
I describe how to use the `LKJCholeskyCov` and `LKJCorr` distributions
to include correlated priors in Bayesian hierarchical modeling using PyMC.

GSOC 2021: Final evaluation
Aug 17, 2021
Final post about Google Summer of Code 2021.
This post sums up my contributions to the Bambi library during the ten weeks of this program.
This post sums up my contributions to the Bambi library during the ten weeks of this program.

Binomial family in Bambi
Aug 3, 2021
My fourth post describing work done during GSoC 2021. On this
occasion, I'm introducing the Binomial family. This new family is very useful
to build models for binary data when each row in the data set contains the
number of successes and the number of trials instead of the results of
Bernoulli trials.

New families in Bambi
Jul 14, 2021
In this third post about my work during this Google Summer of Code
I describe two families of models recently added. The first one, is the
Student T family, used to make linear regressions more robust. The second,
is the Beta family which can be used to model ratings and proportions.

Robust linear regression in Bambi
Jul 5, 2021
Second post about this Google Summer of Code season.
Today I show some of the problems associated with outliers in linear regression and demonstrate how one can implement a robust linear regression in Bambi.
Today I show some of the problems associated with outliers in linear regression and demonstrate how one can implement a robust linear regression in Bambi.

First weeks of GSoC
Jun 28, 2021
First post of a series about my contributions to Bambi in this Google Summer of Code season.
This post highlights new features related to default priors and priors for group-specific effects.
This post highlights new features related to default priors and priors for group-specific effects.

Design matrices for group-specific effects in formulae and lme4
Jun 8, 2021
Bambi uses the library formulae to automatically construct design
matrices for both common and group-specific effects. This post compares design
matrices for group-specific effects obtained with formulae for a variety of
scenarios involving categorical variables with the ones obtained with the R
package lme4.

Why Bambi?
May 24, 2021
An example comparing how to fit a GLM with Bambi and PyMC3. Here I
attempt to highlight how Bambi can help us to write a Bayesian GLM in a concise
manner, saving us from having to realize error-prone tasks that are sometimes
necessary when directly working with PyMC3.

How to generate bingo cards in R
Nov 3, 2020
A walkthrough the process of understanding how bingo cards are composed
and a set of R functions that let us generate random bingo cards and print them
in a nice looking .pdf output.
No matching items