Skip to content
Archive of posts filed under the Stan category.

Statisticians don’t use statistical evidence to decide what statistical methods to use. Also, The Way of the Physicist.

David Bailey, a physicist at the University of Toronto, writes: I thought you’d be pleased to hear that a student in our Advanced Physics Lab spontaneously used Stan to analyze data with significant uncertainties in both x and y. We’d normally expect students to use python and orthogonal distance regression, and STAN is never mentioned […]

Routine hospital-based SARS-CoV-2 testing outperforms state-based data in predicting clinical burden.

Len Covello, Yajuan Si, Siquan Wang, and I write: Throughout the COVID-19 pandemic, government policy and healthcare implementation responses have been guided by reported positivity rates and counts of positive cases in the community. The selection bias of these data calls into question their validity as measures of the actual viral incidence in the community […]

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 […]

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 […]

Mister P for the 2020 presidential election in Belarus

An anonymous group of authors writes: Political situation Belarus is often called the “last dictatorship” in Europe. Rightly so, Aliaskandr Lukashenka has served as the country’s president since 1994. In the 26 years of his rule, Lukashenka has consolidated and extended his power, which is today absolute. Rigging referendums has been an effective means of […]

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 […]

“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 […]

Stan receives its second Nobel prize.

Aki writes: Nobel prize and other science prices are problematic and this is not endorsement of such prices, but this might be useful for someone who needs to tell (hype) about the impact of Stan (or just as another funny fact about Stan). Previously Stan was used in the the LIGO gravitational wave research awarded […]

They’re looking for Stan and R programmers, and they’re willing to pay.

Tom Vladeck writes: I am one half of a company building a media mix model, primarily for online e-commerce brands. Our modeling is done in Stan, and we are looking to hire part time developers (paid, of course, at a real rate) to build and maintain our Stan models and R code. They can be […]

Postdoc in Bayesian spatiotemporal modeling at Imperial College London!

Seth Flaxman writes: We are hiring a postdoctoral research associate with a background in statistics or computer science to join a vibrant team at the cutting edge of the emerging field of spatiotemporal statistical machine learning (ST-SML). ST-SML draws in equal parts on Bayesian spatiotemporal statistics, scalable kernel methods and Gaussian processes, and recent deep […]

Coronavirus disparities in Palestine and in Michigan

I wanted to share two articles that were sent to me recently, one focusing on data collection and one focusing on data analysis. On the International Statistical Institute blog, Ola Awad writes: The Palestinian economy is micro — with the majority of establishments employing less than 10 workers, and the informal sector making up about […]

Why we kept the trig in golf: Mathematical simplicity is not always the same as conceptual simplicity

Someone read the golf example and asked: You define the threshold angle as arcsin((R – r)/x), but shouldn’t it be arctan((R – r)/x) instead? Is it just that it does not matter with these small angles, where sine and tangent are about the same, or am I missing something? My reply: This sin vs tan […]

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 […]

Post-stratified longitudinal item response model for trust in state institutions in Europe

This is a guest post by Marta Kołczyńska: Paul, Lauren, Aki, and I (Marta) wrote a preprint where we estimate trends in political trust in European countries between 1989 and 2019 based on cross-national survey data. This paper started from the following question: How to estimate country-year levels of political trust with data from surveys […]

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: https://github.com/stan-dev/cmdstan/releases/tag/v2.24.1 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 […]

“I just wanted to say that for the first time in three (4!?) years of efforts, I have a way to estimate my model. . . .”

After attending a Stan workshop given by Charles Margossian at McGill University, Chris Barrington-Leigh wrote: I just wanted to say that for the first time in three (4!?) years of efforts, I have a way to estimate my model. Your workshop helped me and pushed me to be persistent enough to code up my model. […]