Why Stan?
Stan is a platform for statistical modeling and statistical computation. While it can perform maximum likelihood estimation (similar to NONMEM’s FOCE), it is mainly used for Bayesian inference.
- Pros:
- Gold standard for implementation of the No U-Turn Sampler (NUTS)
- Wildly flexible in parameterization
- Easy to set whatever priors you want
- Good online support at Stan Discourse, extremely good documentation, and an ecosystem of adjacent packages that help with visualization and processing
- Can be used from within R with the cmdstanr package
- Can handle closed-form solutions or ODEs with no problem
- Cons:
- More difficult language to learn
- Not specifically intended for PK/PD, so doesn’t automatically handle dosing events and common models (like ADVANx in NONMEM). However, this is mostly mitigated when integrating Torsten function calls into your code.
In my opinion, the benefits in the flexibility of Stan far outweigh the drawbacks.
Back to top