Introduction

Morpho is an analysis tool that organizes data inflow to and outflow from Stan, a platform for Bayesian statistical modeling and computation, and RooFit, a toolkit for modeling probability distributions.

It is especially useful for
  1. Generating pseudo data, and
  2. Performing Bayesian statistical analyses of real or fake data—that is, extracting posterior distributions for parameters of interest using data and a model.
  3. Performing chi2 fits of data.

Morpho interfaces with Stan using PyStan, but it is designed to be employed by general Stan users (not only PyStan users).

For more information, also see:

Stan: http://mc-stan.org

PyStan: https://pystan.readthedocs.io/en/latest/index.html

RooFit: https://root.cern.ch/guides/roofit-manual

Why morpho?

  • Morpho streamlines analyses. It enables users to load data, run Stan or RooFit, save results, perform convergence diagnostic tests, and create plots of posteriors and their correlations—all as part of one individual analysis. Users can control some or all of these processes using a single configuration file.
  • Morpho helps users organize and run multiple related Stan models (for example, models that share input data and Stan functions).
  • Morpho minimizes the need to recompile Stan models by using cache files.
  • Morpho automatically performs convergence checks after running Stan, and it provides additional options for convergence analysis and plotting.
  • Morpho reads and saves files in either R, JSON/YAML, CVS, or ROOT.

Stan vs Roofit

Stan uses a Hamiltonian Markov Chain Monte Carlo (HMCMC) algorithm in order to explore probability distributions. HMCMC uses the geometry of a distribution in order to efficiently explore distributions with a large number of parameters. Using HMCMC, however, places the constraint that all elements of the probability distribution must be expressed analytically.

RooFit is a toolkit to represent probability distributions and perform simple fits, such as unbinned maximum likelihood fits, or simple MCMC functionality with the Metropolis-Hastings algorithm. RooFit places less constraints on the form of the probability distribution, and is capable of interfacing with PDFs generated by simulations or other external code.

In general, Stan will be more efficient, and is capable of working with a very large number of parameters. RooFit is slower, but it offers more flexibility in the way probability distributions can be defined.