Hacker News new | ask | show | jobs
by deugtniet 1998 days ago
I've dabbled in Stan, and it's really good and state of the art for Bayesian inference. Starting using Stan is a bit difficult though, as it has a C like programming language that is difficult to master initially. Especially since statistics is usually done in languages like R, so the learning curve is a bit steep for beginners.

I've personally liked PyMC for simple models and relative ease of inference, as it's more integrated with the Python language. That being said, if you want the latest in inference methods and statistical alchemy, Stan is the place to go.

1 comments

There are a good range of other programming language interfaces to Stan. The R one is quite popular.[1]

You do still need the C++ toolchain, but can just write your code in R.

[1] https://mc-stan.org/rstan/

Stan requires models to be coded in the Stan language, which is a simple imperative language that's like MATLAB with explicit data types. This is the same as was done in Stan's predecessors, BUGS and JAGS.

A Stan program can be run in any of our interfaces in Python, Julia, R, MATLAB, Stata, etc. But you can't mix any of those languages into a Stan program.

The C++ toolchain is required because Stan transpiles its programs to C++, then compiles those against the Stan math librarym, which does autodiff. But you don't need to write any C++ to use Stan, just to develop extensions for it.