Tutorials

Learning-oriented guides for getting marketbayesmeta installed and running a first example workflow.

Pages

Subsections of Tutorials

Installation

Use Python 3.11 or newer.

Install from a source checkout

git clone https://github.com/tandpds/marketbayesmeta.git
cd marketbayesmeta

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev]"

Confirm that model dependencies import from the repository virtual environment:

which python
python - <<'PY'
import pymc
import numpy
print("pymc", pymc.__version__)
print("numpy", numpy.__version__)
PY

If PyMC fails to import, recreate .venv before running model fits. Tracker and config validation are still useful without sampling, but analysis runs require a working PyMC/ArviZ stack.

Avoid mixed base conda/user-site environments for release validation. Either activate .venv or prefix checks with:

PATH=.venv/bin:$PATH make check-statistical

Developer checks

make check
make check-statistical

make check is required before finalising code or documentation changes. make check-statistical runs sampling-based contract tests and should pass in the environment used for model work.

Next steps

Quick Start

The quickest way to see the package workflow is to run the synthetic example config.

source .venv/bin/activate
python runme.py examples/config.yaml

The example config points to examples/example_tracker.csv and writes outputs to:

output/example_geo_sales_uplift/

The example is intentionally small. It should complete and write the full artefact set, but it is not expected to be reportable because readiness is directional.

Check the config

marketbayesmeta-check-config examples/config.yaml

Run the config

marketbayesmeta-run examples/config.yaml

Review the result

Start with:

  • analysis_report.md
  • run_status.json
  • readiness.csv
  • diagnostics.csv
  • prior_diagnostics.csv
  • effect_preparation.csv
  • ppc.csv

The relevant question is not just whether the run completed. It is whether run_status.reportable is true after reviewing diagnostics, readiness, uncertainty provenance, and sensitivity outputs.