stan-distributions

Stan distributions

A web app to visualize distributions in Stan. It uses Stan Math C++ code to evaluate the log probability density/mass functions. The Stan Math C++ is compiled to Webassembly using Emscripten. d3.js is used for visualizations.

This was inspired by the distribution zoo. The main differences of this approach are:

This currently supports the majority of Stan’s univariate continuous distributions. Missing discrete distributions will be added shortly.

Unbounded Continuous Distributions

Positive Continuous Distributions

Positive Lower-Bounded Distributions

Continuous Distributions on [0, 1]

Circular Distributions

Bounded Continuous Distributions

Custom distributions

Contributed by @noejn2.

Running it locally

  1. Clone the repository
git clone https://github.com/rok-cesnovar/stan-distributions/
  1. Start a simple Python server

This is required in order to serve the .wasm files. The actual computation still happens in the browser.

python3 -m http.server 8000
  1. Open localhost:8000 in your favorite browser. Change the port number in step 2 if needed.