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

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

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

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

StanCon 2020 program is now online!

This year’s Stan Conference is on August 13, 2020 (next Thursday)! The program has been finalized and is online. So far, we’re at 89 registrants spanning across 17 countries! Registration is $50, which includes swag. There are scholarships available for those that need financial support. If you’re a Stan developer, there’s a discount (see the […]

The typical set and its relevance to Bayesian computation

[Note: The technical discussion w.r.t. Stan is continuing on the Stan forums.] tl;dr The typical set (at some level of coverage) is the set of parameter values for which the log density (the target function) is close to its expected value. As has been much discussed, this is not the same as the posterior mode. […]

StanCon 2020 registration is live!

Dear Stan Community,  The StanCon Organizing Committee is glad to communicate the registration for the virtual StanCon 2020 is now live. Please visit the registration page (see: https://stancon.mc-stan.org/) to purchase your tickets.  The conference will be a 24-hours event with three main sessions spanning across different time zones (British Summer Time, Eastern Time and Pacific […]

Regression and Other Stories is available!

This will be, without a doubt, the most fun you’ll have ever had reading a statistics book. Also I think you’ll learn a few things reading it. I know that we learned a lot writing it. Regression and Other Stories started out as the first half of Data Analysis Using Regression and Multilevel/Hierarchical Models, but […]

“Time Travel in the Brain”

Natalie Biderman and Daphna Shohamy wrote this science article for kids. Here’s the abstract: Do you believe in time travel? Every time we remember something from the past or imagine something that will happen in the future, we engage in mental time travel. Scientists discovered that, whether we mentally travel back into the past or […]

Shortest posterior intervals

By default we use central posterior intervals. For example, the central 95% interval is the (2.5%, 97.5%) quantiles. But sometimes the central interval doesn’t seem right. This came up recently with a coronavirus testing example, where the posterior distribution for the parameter of interest was asymmetric so that the central interval is not such a […]

Stacking for Non-mixing Bayesian Computations: The Curse and Blessing of Multimodal Posteriors

Yuling, Aki, and I write: When working with multimodal Bayesian posterior distributions, Markov chain Monte Carlo (MCMC) algorithms can have difficulty moving between modes, and default variational or mode-based approximate inferences will understate posterior uncertainty. And, even if the most important modes can be found, it is difficult to evaluate their relative weights in the […]

“Estimating the effects of non-pharmaceutical interventions on COVID-19 in Europe”

Seth Flaxman writes: Our work on non-pharmaceutical interventions in 11 European countries (originally Imperial report 13) is now published in Nature, Estimating the effects of non-pharmaceutical interventions on COVID-19 in Europe. Of note for your readers: 1) Nature has an open peer review process, so you can see the (pre-publication) peer review here. 2) Between […]

“Worthwhile content in PNAS”

Ben Bolker sends an email with the above subject line, a link to this article, and the following content: Experimental evidence that hummingbirds can see purple … researchers used Stan to analyze the data … The article in question is called “Wild hummingbirds discriminate nonspectral colors” and is by Mary Caswell Stoddard, Harold Eyster, Benedict […]