StatSim — probabilistic programming and statistical computing for Python.
# Basic installation
pip install statsim
# With PyMC backend
pip install statsim[pymc]
# With Stan backend
pip install statsim[stan]
# With all backends
pip install statsim[all]from statsim import compile, run
# Compile .sm model
model = compile('''
mu ~ Normal(0, 10)
sigma ~ HalfNormal(5)
y ~ Normal(mu, sigma)
''', target='pymc')
# Run inference
result = run(model, backend='pymc')- PyMC: Full Bayesian inference with MCMC and variational methods
- Stan: High-performance HMC/NUTS sampling