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

Fitting the Besag, York, and Mollie spatial autoregression model with discrete data

Rudy Banerjee writes: I am trying to use the Besag, York & Mollie 1991 (BYM) model to study the sociology of crime and space/time plays a vital role. Since many of the variables and parameters are discrete in nature is it possible to develop a BYM that uses an Integer Auto-regressive (INAR) process instead of […]

Stan development in RStudio

Check this out! RStudio now has special features for Stan: – Improved, context-aware autocompletion for Stan files and chunks – A document outline, which allows for easy navigation between Stan code blocks – Inline diagnostics, which help to find issues while you develop your Stan model – The ability to interrupt Stan parallel workers launched […]

Stan on the web! (thanks to RStudio)

This is big news. Thanks to RStudio, you can now run Stan effortlessly on the web. So you can get started on Stan without any investment in set-up time, no need to install C++ on your computer, etc. As Ben Goodrich writes, “RStudio Cloud is particularly useful for Stan tutorials where a lot of time […]

Cool postdoc position in Arizona on forestry forecasting using tree ring models!

Margaret Evans sends in this cool job ad: Two-Year Post Doctoral Fellowship in Forest Ecological Forecasting, Data Assimilation A post-doctoral fellowship is available in the Laboratory of Tree-Ring Research (University of Arizona) to work on an NSF Macrosystems Biology-funded project assimilating together tree-ring and forest inventory data to analyze patterns and drivers of forest productivity […]

Postdoc position: Stan and composite mechanistic and data-driven models of cellular metabolism

Very cool project and possibility to work 3 years developing Stan and collaborating with me (Aki) and other Stan development team. Deadline for applications is 22 October. Quantitative Modelling of Cell Metabolism (QMCM) group headed by Professor Lars Keld Nielsen at DTU, Copenhagen, is looking for experienced Bayesian statistician for a postdoc position. Group specializes […]

Using Stacking to Average Bayesian Predictive Distributions (with Discussion)

I’ve posted on this paper (by Yuling Yao, Aki Vehtari, Daniel Simpson, and myself) before, but now the final version has been published, along with a bunch of interesting discussions and our rejoinder. This has been an important project for me, as it answers a question that’s been bugging me for over 20 years (since […]

The hot hand—in darts!

Roland Langrock writes: Since on your blog you’ve regularly been discussing hot hand literature – which we closely followed – I’m writing to share with you a new working paper we wrote on a potential hot hand pattern in professional darts. We use state-space models in which a continuous-valued latent “hotness” variable, modeled as an […]

“Dynamically Rescaled Hamiltonian Monte Carlo for Bayesian Hierarchical Models”

Aki points us to this paper by Tore Selland Kleppe, which begins: Dynamically rescaled Hamiltonian Monte Carlo (DRHMC) is introduced as a computationally fast and easily implemented method for performing full Bayesian analysis in hierarchical statistical models. The method relies on introducing a modified parameterisation so that the re-parameterised target distribution has close to constant […]

Against Winner-Take-All Attribution

This is the anti-Wolfram. I did not design or write the Stan language. I’m a user of Stan. Lots of people designed and wrote Stan, most notably Bob Carpenter (designed the language and implemented lots of the algorithms), Matt Hoffman (came up with the Nuts algorithm), and Daniel Lee (put together lots of the internals […]

StanCon 2018 Helsinki tutorial videos online

StanCon 2018 Helsinki tutorial videos are now online at Stan YouTube channel List of tutorials at StanCon 2018 Helsinki Basics of Bayesian inference and Stan, parts 1 + 2, Jonah Gabry & Lauren Kennedy Hierarchical models, parts 1 + 2, Ben Goodrich Stan C++ development: Adding a new function to Stan, parts 1 + 2, […]

StanCon Helsinki streaming live now (and tomorrow)

We’re streaming live right now! Thursday 08:45-17:30: YouTube Link Friday 09:00-17:00: YouTube Link Timezone is Eastern European Summer Time (EEST) +0300 UTC Here’s a link to the full program [link fixed]. There have already been some great talks and they’ll all be posted with slides and runnable source code after the conference on the Stan […]

“To get started, I suggest coming up with a simple but reasonable model for missingness, then simulate fake complete data followed by a fake missingness pattern, and check that you can recover your missing-data model and your complete data model in that fake-data situation. You can then proceed from there. But if you can’t even do it with fake data, you’re sunk.”

Alex Konkel writes on a topic that never goes out of style: I’m working on a data analysis plan and am hoping you might help clarify something you wrote regarding missing data. I’m somewhat familiar with multiple imputation and some of the available methods, and I’m also becoming more familiar with Bayesian modeling like in […]

Three informal case studies: (1) Monte Carlo EM, (2) a new approach to C++ matrix autodiff with closures, (3) C++ serialization via parameter packs

Andrew suggested I cross-post these from the Stan forums to his blog, so here goes. Maximum marginal likelihood and posterior approximations with Monte Carlo expectation maximization: I unpack the goal of max marginal likelihood and approximate Bayes with MMAP and Laplace approximations. I then go through the basic EM algorithm (with a traditional analytic example […]

Thanks, NVIDIA

Andrew and I both received a note like this from NVIDIA: We have reviewed your NVIDIA GPU Grant Request and are happy support your work with the donation of (1) Titan Xp to support your research. Thanks! In case other people are interested, NVIDA’s GPU grant program provides ways for faculty or research scientists to […]

Awesome MCMC animation site by Chi Feng! On Github!

Sean Talts and Bob Carpenter pointed us to this awesome MCMC animation site by Chi Feng. For instance, here’s NUTS on a banana-shaped density. This is indeed super-cool, and maybe there’s a way to connect these with Stan/ShinyStan/Bayesplot so as to automatically make movies of Stan model fits. This would be great, both to help […]

Stan short course in NYC in 2.5 weeks

To all who may be interested: Jonah Gabry, Stan developer and creator of ShinyStan, will be giving a short course downtown, from 6-8 Aug. Details here. Jonah has taught Stan courses before, and he knows what he’s doing.

Mister P wins again

Chad Kiewiet De Jonge, Gary Langer, and Sofi Sinozich write: This paper presents state-level estimates of the 2016 presidential election using data from the ABC News/Washington Post tracking poll and multilevel regression with poststratification (MRP). While previous implementations of MRP for election forecasting have relied on data from prior elections to establish poststratification targets for […]

Where do I learn about log_sum_exp, log1p, lccdf, and other numerical analysis tricks?

Richard McElreath inquires: I was helping a colleague recently fix his MATLAB code by using log_sum_exp and log1m tricks. The natural question he had was, “where do you learn this stuff?” I checked Numerical Recipes, but the statistical parts are actually pretty thin (at least in my 1994 edition). Do you know of any books/papers […]

Anyone want to run this Bayesian computing conference in 2022?

OK, people think I’m obsessive with a blog with a 6-month lag, but that’s nothing compared to some statistics conferences. Mylène Bédard sends this along for anyone who might be interested: The Bayesian Computation Section of ISBA is soliciting proposals to host its flagship conference: Bayes Comp 2022 The expectation is that the meeting will […]

Multilevel modeling in Stan improves goodness of fit — literally.

John McDonnell sends along this post he wrote with Patrick Foley on how they used item-response models in Stan to get better clothing fit for their customers: There’s so much about traditional retail that has been difficult to replicate online. In some senses, perfect fit may be the final frontier for eCommerce. Since at Stitch […]