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

Lasso regression etc in Stan

Someone on the users list asked about lasso regression in Stan, and Ben replied: In the rstanarm package we have stan_lm(), which is sort of like ridge regression, and stan_glm() with family = gaussian and prior = laplace() or prior = lasso(). The latter estimates the shrinkage as a hyperparameter while the former fixes it […]

Stan and BDA on actuarial syllabus!

Avi Adler writes: I am pleased to let you know that the Casualty Actuarial Society has announced two new exams and released their initial syllabi yesterday. Specifically, 50%–70% of the Modern Actuarial Statistics II exam covers Bayesian Analysis and Markov Chain Monte Carlo. The official text we will be using is BDA3 and while we […]

HMMs in Stan? Absolutely!

I was having a conversation with Andrew that went like this yesterday: Andrew: Hey, someone’s giving a talk today on HMMs (that someone was Yang Chen, who was giving a talk based on her JASA paper Analyzing single-molecule protein transportation experiments via hierarchical hidden Markov models). Maybe we should add some specialized discrete modules to […]

You can fit hidden Markov models in Stan (and thus, also in Stata! and Python! and R! and Julia! and Matlab!)

You can fit finite mixture models in Stan; see section 12 of the Stan manual. You can fit change point models in Stan; see section 14.2 of the Stan manual. You can fit mark-recapture models in Stan; see section 14.2 of the Stan manual. You can fit hidden Markov models in Stan; see section 9.6 […]

Job opening for a Stan user in pharma

Perceval Sondag is hiring for a Junior Statistician at Arlenda. Although the official post doesn’t mention it, Perceval writes: On the other hand, I’ll be the one conducting the interviews and I can tell you that the knowledge of Stan, at least at a basic level for a junior/intern, is something that I require to work […]

Thanks for attending StanCon 2017!

Thank you all for coming and making the first Stan Conference a success! The organizers were blown away by how many people came to the first conference. We had over 150 registrants this year! StanCon 2017 Video The organizers managed to get a video stream on YouTube: https://youtu.be/DJ0c7Bm5Djk. We have over 1900 views since StanCon! (We lost […]

Quantifying uncertainty in identification assumptions—this is important!

Luis Guirola writes: I’m a poli sci student currently working on methods. I’ve seen you sometimes address questions in your blog, so here is one in case you wanted. I recently read some of Chuck Manski book “Identification for decision and prediction”. I take his main message to be “The only way to get identification […]

Stan Conference Live Stream

StanCon 2017 is tomorrow! Late registration ends in an hour. After that, all tickets are $400. We’re going to be live streaming the conference. You’ll find the stream as a YouTube Live event from 8:45 am to 6 pm ET (and whatever gets up will be recorded by default). We’re streaming it ourselves, so if there are […]

Come and work with us!

Stan is an open-source, state-of-the-art probabilistic programming language with a high-performance Bayesian inference engine written in C++. Stan had been successfully applied to modeling problems with hundreds of thousands of parameters in fields as diverse as econometrics, sports analytics, physics, pharmacometrics, recommender systems, political science, and many more. Research using Stan has been featured in […]

30 tickets left to StanCon 2017! New sponsor!

Stan Conference 2017 is on Saturday. We just sold our 150th ticket! Capacity is 180. It’s going to be an amazing event. Register here (while tickets are still available): https://stancon2017.eventbrite.com Our Q&A Panel will have some members of the Stan Development Team: Andrew Gelman. Stan super user. Bob Carpenter. Stan language, math library. Michael Betancourt. […]

Stan is hiring! hiring! hiring! hiring!

[insert picture of adorable cat entwined with Stan logo] We’re hiring postdocs to do Bayesian inference. We’re hiring programmers for Stan. We’re hiring a project manager. How many people we hire depends on what gets funded. But we’re hiring a few people for sure. We want the best best people who love to collaborate, who […]

Stan JSS paper out: “Stan: A probabilistic programming language”

As a surprise welcome to 2017, our paper on how the Stan language works along with an overview of how the MCMC and optimization algorithms work hit the stands this week. Bob Carpenter, Andrew Gelman, Matthew D. Hoffman, Daniel Lee, Ben Goodrich, Michael Betancourt, Marcus Brubaker, Jiqiang Guo, Peter Li, and Allen Riddell. 2017. Stan: […]

“A Conceptual Introduction to Hamiltonian Monte Carlo”

Michael Betancourt writes: Hamiltonian Monte Carlo has proven a remarkable empirical success, but only recently have we begun to develop a rigorous understanding of why it performs so well on difficult problems and how it is best applied in practice. Unfortunately, that understanding is con- fined within the mathematics of differential geometry which has limited […]

StanCon 2017 Schedule

The first Stan Conference is next Saturday, January 21, 2017! If you haven’t registered, here’s the link: https://stancon2017.eventbrite.com I wouldn’t wait until the last minute—we might sell out before you’re able to grab a ticket. We’re up to 125 registrants now. If we have any space left, tickets will be $400 at the door. Schedule. […]

R packages interfacing with Stan: brms

Over on the Stan users mailing list I (Jonah) recently posted about our new document providing guidelines for developing R packages interfacing with Stan. As I say in the post and guidelines, we (the Stan team) are excited to see the emergence of some very cool packages developed by our users. One of these packages […]

Stan 2.14 released for R and Python; fixes bug with sampler

Stan 2.14 is out and it fixes the sampler bug in Stan versions 2.10 through 2.13. Critical update It’s critical to update to Stan 2.14. See: RStan 2.14.1 PyStan 2.14.0.0 CmdStan 2.14.0 The other interfaces will update when you udpate CmdStan. The process After Michael Betancourt diagnosed the bug, it didn’t take long for him […]

Michael found the bug in Stan’s new sampler

Gotcha! Michael found the bug! That was a lot of effort, during which time he produced ten pages of dense LaTeX to help Daniel and me understand the algorithm enough to help debug (we’re trying to write a bunch of these algorithmic details up for a more general audience, so stay tuned). So what was […]

Stan 2.10 through Stan 2.13 produce biased samples

[Update: bug found! See the follow-up post, Michael found the bug in Stan’s new sampler] [Update: rolled in info from comments.] After all of our nagging of people to use samplers that produce unbiased samples, we are mortified to have to announce that Stan versions 2.10 through 2.13 produce biased samples. The issue Thanks to […]

Using Stan in an agent-based model: Simulation suggests that a market could be useful for building public consensus on climate change

Jonathan Gilligan writes: I’m writing to let you know about a preprint that uses Stan in what I think is a novel manner: Two graduate students and I developed an agent-based simulation of a prediction market for climate, in which traders buy and sell securities that are essentially bets on what the global average temperature […]

Interesting epi paper using Stan

Jon Zelner writes: Just thought I’d send along this paper by Justin Lessler et al. Thought it was both clever & useful and a nice ad for using Stan for epidemiological work. Basically, what this paper is about is estimating the true prevalence and case fatality ratio of MERS-CoV [Middle East Respiratory Syndrome Coronavirus Infection] […]