Rstan vs Pystan on macOS Catalina

Hi @bgoodri,

Does Pystan also has problems running on Catalina? is there any performance boost in using python instead of R for Stan, in general?

Hi, I if you follow the conda workflow for the compiler you should not have any problems. Setting up system compiler should be the same for R and Python.

PyStan is in 2.19.1

There should be no difference in Stan performance, but PyStan is slower for really large data.

RStan has more bells and whistles. Also in Python you probably want to do the diagnostics with ArviZ library.

1 Like

@ahartikainen Ok thanks!

I guess sticking to R for Stan is a better option then.

Do you have any information about Stan in MATLAB and it’s performance compared to R? I have a model in Stan and MATLAB which I was looking at.


I doubt the performance difference is notable. But there are much fewer diagnostics and supporting functions outside of RStan / PyStan / JuliaStan (in that order).

1 Like

what kind of performance boost are you looking for?
all interfaces ultimately run a c++ program. if you’ve got a complicated model, running the sampler will dominate your processing time, no matter which interface you use.

the command line interface CmdStan has the least additional overhead.
CmdStanPy and CmdStanR are lightweight wrappers that wrap CmdStan. all of these give you faster compile times than current RStan and PyStan because they’re running a later version of Stan (2.22.1).