Quickstart (YAML Runner)
Goal
Complete one reproducible DSAMbayes runner execution from validation to artefact inspection, then load the fitted model in R to explore the results interactively.
Before you start
Complete the setup in Install and Setup. If you want to build a model interactively from R code instead of YAML, see Your First BLM Model.
1. Set up the environment
Open a terminal in the repository root:
2. Validate the configuration (dry run)
Expected: exits with code 0. No Stan compilation or sampling occurs.
3. Execute the full run
Expected: a timestamped run directory under results/ with staged outputs.
4. Locate and inspect the run directory
Expected stage folders:
| Folder | Content |
|---|---|
00_run_metadata/ |
Resolved config, session info |
10_pre_run/ |
VIF report, data dictionary, media spend plots |
20_model_fit/ |
Fitted model object, fit plots |
30_post_run/ |
Posterior summary, fitted/observed CSVs |
40_diagnostics/ |
Diagnostics report, residual plots |
50_model_selection/ |
LOO summary, Pareto-k diagnostics |
60_optimisation/ |
Budget allocation, response curves (when enabled) |
5. Verify key artefacts
6. Load the model in R
The fitted model is saved as an RDS object. Load it interactively to explore:
7. Review diagnostics
Open 40_diagnostics/diagnostics_report.csv — each row is one diagnostic check:
- pass — no action needed.
- warn — review recommended; see Interpret Diagnostics.
- fail — remediate before using results for decisions.
8. Bootstrap a new config
Generate a template for your own data:
Edit config/my_model.yaml to point to your data and formula, then validate and run.
If the quickstart fails
- Re-run
validatebeforerunto catch config errors early. - Check the error message — DSAMbayes uses
cli::cli_abort()with descriptive context. - Inspect
00_run_metadata/config.resolved.yamlto see what defaults were applied. - See Debug Run Failures for common failure modes.
Next steps
- Your First BLM Model — interactive R API walkthrough
- Config Schema — full YAML reference
- Output Artefacts — what each file means
- Plot Catalogue — how to interpret every plot