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

Betancourt Binge (Video Lectures on HMC and Stan)

Even better than binging on Netflix, catch up on Michael Betancourt’s updated video lectures, just days after their live theatrical debut in Tokyo. Scalable Bayesian Inference with Hamiltonian Monte Carlo (YouTube, 1 hour) Some Bayesian Modeling Techniques in Stan (YouTube, 1 hour 40 minutes) His previous videos have received very good reviews and they’re only […]

A Primer on Bayesian Multilevel Modeling using PyStan

Chris Fonnesbeck contributed our first PyStan case study (I wrote the abstract), in the form of a very nice Jupyter notebook. Daniel Lee and I had the pleasure of seeing him present it live as part of a course we were doing at Vanderbilt last week. A Primer on Bayesian Multilevel Modeling using PyStan This […]

Stan workshop this Thurs NYC

Jonah is speaking at the Bayesian Data Analysis meetup on Thursday night, “Stan Workshop. Life is precious: fix your sampling problems.” He’ll focus on common problems using MCMC and how to address them. For registration:

Birthday analysis—Friday the 13th update, and some model checking

Carl Bialik and Andrew Flowers at (Nate Silver’s site) ran a story following up on our birthdays example—that time series decomposition of births by day, which is on the cover of the third edition of Bayesian Data Analysis using data from 1968-1988, and which then Aki redid using a new dataset from 2000-2014. Friday […]

Point summary of posterior simulations?

Luke Miratrix writes: ​In the applied stats class ​I’m teaching ​on​ hierarchical models I’m giving the students (a mix of graduate students, many from the education school, and undergrads) a taste of Stan. I have to give them some “standard” way to turn Stan output into a point estimate (though of course I’ll also explain […]

Stochastic natural-gradient EP

Yee Whye Teh sends along this paper with Leonard Hasenclever, Thibaut Lienart, Sebastian Vollmer, Stefan Webb, Balaji Lakshminarayanan, and Charles Blundell. I haven’t read it in detail but they not similarities to our “expectation propagation as a way of life” paper. But their work is much more advanced than ours.

A new idea for a science core course based entirely on computer simulation

I happen to come across this post from 2011 that I like so much, I thought I’d say it again: Columbia College has for many years had a Core Curriculum, in which students read classics such as Plato (in translation) etc. A few years ago they created a Science core course. There was always some […]

Stan Coding Corner: O(N) Change-Point Program with Clever Forward-Backward Calculation

It’s so much fun to work in open source. Luke Wiklendt sent along this improved code for a change-point model calculation in Stan. With N data points in the time series, the version in the manual is O(N2), whereas the improved version is O(N). In practice, Luke says [the new code] results in a dramatic […]

Black Box Challenge

Georgy Cheremovskiy writes: I’m one of the organizers of an unusual reinforcement learning competition named Black Box Challenge. The conception is simple — one need to program an agent that can play a game with unknown rules. At each time step agent is given an environment state vector and has a few possible actions. The […]

“Rbitrary Standards”

Allen and Michael pointed us on the Stan list to these amusing documents by Oliver Keyes: Rbitrary Standards: “This is an alternate FAQ for R. Specifically, it’s an FAQ that tries to answer all the questions about R’s weird standards, formatting and persnicketiness that you’re afraid to ask.” Parallelism, R, and OpenMP Enjoy.

Actually, I’d just do full Bayes

Dave Clark writes: I was hoping for your opinion on a topic related to hierarchical models. I am an actuary and have generally worked with the concept of hierarchical models in the context of credibility theory. The text by Bühlmann and Gisler (A Course in Credibility Theory; Springer) sets up the mixed models under the […]

Stan Case Studies Launches

There’s a new section of the Stan web site, with case studies meant to illustrate statistical methodologies, classes of models, application areas, statistical computation, and Stan programming. Stan Case Studies The first ten or so are up, including a grab bag of education models from Daniel Furr at U.C. Berkeley: Hierarchical Two-Parameter Logistic Item Response […]

Bayesian inference for network links

A colleague writes: I’m working with a doctoral student on a latent affinity network problem and we keep hitting challenges in sampling, in our case using Metropolis-Hastings, for the network links. As you can imagine, lots of local modes, things get stuck, etc . . . Any suggestions on how to sample network links? My […]

Fitting the birthday model in Stan

I’m scheduling these posts a few months ahead of time, and I realize this is the perfect date for an update on the birthday model. Can we fit in Stan yet? As of this writing, I don’t know. But Aki and Seth assure me that we’re close . . . P.S. Happy 13th birthday, Craig!

TOP SECRET: Newly declassified documents on evaluating models based on predictive accuracy

We recently had an email discussion among the Stan team regarding the use of predictive accuracy in evaluating computing algorithms. I thought this could be of general interest so I’m sharing it here. It started when Bob said he’d been at a meting on probabilistic programming where there was confusion on evaluation. In particular, some […]

One quick tip for building trust in missing-data imputations?

Peter Liberman writes: I’m working on a paper that, in the absence of a single survey that measured the required combination of variables, analyzes data collected by separate, uncoordinated Knowledge Networks surveys in 2003. My co-author (a social psychologist who commissioned one of the surveys) and I obtained from KN unique id numbers for all […]

Jim Albert’s Baseball Blog

Jim Albert has a baseball blog: Baseball with R I sent a link internally to people I knew were into baseball, to which Andrew replied, “I agree that it’s cool that he doesn’t just talk, he has code.” (No kidding—the latest post as of writing this was on an R package to compute value above […]

McElreath’s Statistical Rethinking: A Bayesian Course with Examples in R and Stan

We’re not even halfway through with January, but the new year’s already rung in a new book with lots of Stan content: Richard McElreath (2016) Statistical Rethinking: A Bayesian Course with Examples in R and Stan. Chapman & Hall/CRC Press. This one got a thumbs up from the Stan team members who’ve read it, and […]

rstanarm and more!

Ben Goodrich writes: The rstanarm R package, which has been mentioned several times on stan-users, is now available in binary form on CRAN mirrors (unless you are using an old version of R and / or an old version of OSX). It is an R package that comes with a few precompiled Stan models — […]

Stan 2.9 is Here!

We’re happy to announce that Stan 2.9.0 is fully available(1) for CmdStan, RStan, and PyStan — it should also work for Stan.jl (Julia), MatlabStan, and StataStan. As usual, you can find everything you need on the Stan Home Page. The main new features are: R/MATLAB-like slicing of matrices. There’s a new chapter in the user’s […]