Skip to content
Archive of posts filed under the Statistical computing category.

Simulation-based calibration: Two theorems

Throat-clearing OK, not theorems. Conjectures. Actually not even conjectures, because for a conjecture you have to, y’know, conjecture something. Something precise. And I got nothing precise for you. Or, to be more precise, what is precise in this post is not new, and what is new is not precise. Background OK, first for the precise […]

How many infectious people are likely to show up at an event?

Stephen Kissler and Yonatan Grad launched a Shiny app, Effective SARS-CoV-2 test sensitivity, to help you answer the question, How many infectious people are likely to show up to an event, given a screening test administered n days prior to the event? Here’s a screenshot. The app is based on some modeling they did with […]

“I Can’t Believe It’s Not Better”

Check out this session Saturday at Neurips. It’s a great idea, to ask people to speak on methods that didn’t work. I have a lot of experience with that! Here are the talks: Max Welling: The LIAR (Learning with Interval Arithmetic Regularization) is Dead Danielle Belgrave: Machine Learning for Personalised Healthcare: Why is it not […]

Hamiltonian Monte Carlo using an adjoint-differentiated Laplace approximation: Bayesian inference for latent Gaussian models and beyond

Charles Margossian, Aki Vehtari, Daniel Simpson, Raj Agrawal write: Gaussian latent variable models are a key class of Bayesian hierarchical models with applications in many fields. Performing Bayesian inference on such models can be challenging as Markov chain Monte Carlo algorithms struggle with the geometry of the resulting posterior distribution and can be prohibitively slow. […]

2 PhD student positions on Bayesian workflow! With Paul Bürkner!

Paul Bürkner writes: The newly established work group for Bayesian Statistics of Dr. Paul-Christian Bürkner at the Cluster of Excellence SimTech, University of Stuttgart (Germany), is looking for 2 PhD students to work on Bayesian workflow and Stan-related topics. The positions are fully funded for at least 3 years and people with a Master’s degree […]

Bayesian Workflow

Aki Vehtari, Daniel Simpson, Charles C. Margossian, Bob Carpenter, Yuling Yao, Paul-Christian Bürkner, Lauren Kennedy, Jonah Gabry, Martin Modrák, and I write: The Bayesian approach to data analysis provides a powerful way to handle uncertainty in all observations, model parameters, and model structure using probability theory. Probabilistic programming languages make it easier to specify and […]

Concerns with our Economist election forecast

A few days ago we discussed some concerns with Fivethirtyeight’s election forecast. This got us thinking again about some concerns with our own forecast for The Economist (see here for more details). Here are some of our concerns with our forecast: 1. Distribution of the tails of the national vote forecast 2. Uncertainties of state […]

Interactive analysis needs theories of inference

Jessica Hullman and I wrote an article that begins, Computer science research has produced increasingly sophisticated software interfaces for interactive and exploratory analysis, optimized for easy pattern finding and data exposure. But assuming that identifying what’s in the data is the end goal of analysis misrepresents strong connections between exploratory and confirmatory analysis and contributes […]

Hiring at all levels at Flatiron Institute’s Center for Computational Mathematics

We’re hiring at all levels at my new academic home, the Center for Computational Mathematics (CCM) at the Flatiron Insitute in New York City. We’re going to start reviewing applications January 1, 2021. A lot of hiring We’re hoping to hire many people for each of the job ads. The plan is to grow CCM […]

“Model takes many hours to fit and chains don’t converge”: What to do? My advice on first steps.

The above question came up on the Stan forums, and I replied: Hi, just to give some generic advice here, I suggest simulating fake data from your model and then fitting the model and seeing if you can recover the parameters. Since it’s taking a long time to run, I suggest just running your 4 […]

Stan’s Within-Chain Parallelization now available with brms

The just released R package brms version 2.14.0 supports within-chain parallelization of Stan. This new functionality is based on the recently introduced reduce_sum function in Stan, which allows to evaluate sums over (conditionally) independent log-likelihood terms in parallel, using multiple CPU cores at the same time via threading. The idea of reduce_sum is to exploit […]

Everything that can be said can be said clearly.

The title as many may know, is a quote from Wittgenstein. It is one that has haunted me for many years. As a first year undergrad, I had mistakenly enrolled in a second year course that was almost entirely based on Wittgenstein’s  Tractatus. Alarmingly, the drop date had passed before I grasped I was supposed […]

From monthly return rate to importance sampling to path sampling to the second law of thermodynamics to metastable sampling in Stan

(This post is by Yuling, not Andrew, except many ideas are originated from Andrew.) This post is intended to advertise our new preprint Adaptive Path Sampling in Metastable Posterior Distributions  by Collin, Aki, Andrew and me, where we developed an automated implementation of path sampling and adaptive continuous tempering. But I have been recently reading a writing book […]

Parallel in Stan

by Andrew Gelman and Bob Carpenter We’ve been talking about some of the many many ways that parallel computing is, or could be used, in Stan. Here are a few: – Multiple chains (Stan runs 4 or 8 on my laptop automatically) – Hessians scale linearly in computation with dimension and are super useful. And […]

Bayesian Workflow (my talk this Wed at Criteo)

Wed 26 Aug 5pm Paris time (11am NY time): The workflow of applied Bayesian statistics includes not just inference but also model building, model checking, confidence-building using fake data, troubleshooting problems with computation, model understanding, and model comparison. We move toward codifying these steps in the realistic scenario in which we are fitting many models […]

Cmdstan 2.24.1 is released!

Rok writes: We are very happy to announce that the next release of Cmdstan (2.24.1) is now available on Github. You can find it here: 2 New features: A new ODE interface Functions for hidden Markov models with a discrete latent variable Elementwise pow operator and matrix power function Newton solver Support for the […]

epidemia: An R package for Bayesian epidemiological modeling

Jamie Scott writes: I am a PhD candidate at Imperial College, and have been working with colleagues here to write an R package for fitting Bayesian epidemiological models using Stan. We thought this might interest readers of your blog, as it is based on work previously featured there. The package is similar in spirit to […]

More on absolute error vs. relative error in Monte Carlo methods

This came up again in a discussion from someone asking if we can use Stan to evaluate arbitrary integrals. The integral I was given was the following: where the -ball is assumed to be in dimensions so that . (MC)MC approach The textbook Monte Carlo approach (Markov chain or plain old) to evaluating such an […]

Regression and Other Stories translated into Python!

Ravin Kumar writes in with some great news: As readers of this blog likely know Andrew Gelman, Jennifer Hill, and Aki Vehtari have recently published a new book, Regression and Other Stories. What readers likely don’t know is that there is an active effort to translate the code examples written in R and the rstanarm […]

StanCon 2020 is on Thursday!

For all that registered for the conference, THANK YOU! We, the organizers, are truly moved by how global and inclusive the community has become. We are currently at 230 registrants from 33 countries. And 25 scholarships were provided to people in 12 countries. Please join us. Registration is $50. We have scholarships still available (more […]

Best CBD Oil for Pain (2021)

CBD Gummies

CBD Oil for Kids (2021)

Best CBD Oil for Anxiety (2021)