Expected outcome: this resolves with defaults for all omitted sections and passes schema validation if the file exists and formula variables exist in data.
Section reference
schema_version
Key
Type
Default
Rules
schema_version
integer
1
Only 1 is supported.
data
Key
Type
Default
Rules
data.path
string
none
Required. File must exist. Relative path resolves from config directory.
data.format
string
inferred from file extension
Must be csv, rds, or long.
data.date_var
string or null
null
Required for data.format: long. Required when holidays are enabled. Required at runtime for time-series selection.
data.date_format
string or null
null
Optional date parser format for date columns.
data.na_action
string
omit
Must be omit or error during formula/data checks.
data.long_id_col
string or null
null
Required when data.format: long.
data.long_variable_col
string or null
null
Required when data.format: long.
data.long_value_col
string or null
null
Required when data.format: long.
data.dictionary_path
string or null
null
Optional CSV. Must exist if provided. Relative path resolves from config directory.
data.dictionary
mapping
{}
Optional inline metadata keyed by term name. Allowed fields: unit, cadence, source, transform, rationale.
Long-format-specific rules:
data.long_id_col, data.long_variable_col, data.long_value_col, and data.date_var must all be set.
These four column names must be distinct.
Long data is reshaped wide before modelling and duplicate key rows are rejected.
model
Key
Type
Default
Rules
model.name
string
config filename stem
Used in run folder slug.
model.formula
string
none
Required. Must parse to y ~ ....
model.type
string
auto
auto, blm, re, cre, pooled.
model.kpi_type
string
revenue
revenue or subscriptions.
model.scale
boolean
true
Controls internal scaling before fit.
model.force_recompile
boolean
false
Forces Stan recompile when true.
Model type resolution rules:
auto resolves to pooled if pooling.enabled: true.
auto resolves to cre if cre.enabled: true.
auto resolves to re if formula contains bar terms (for example (1 | group)).
auto resolves to blm otherwise.
re or cre requires bar terms in formula.
blm or pooled cannot be used with bar terms.
cre
Key
Type
Default
Rules
cre.enabled
boolean
false (or true when model.type: cre)
Cannot be true for model.type: blm or pooled.
cre.vars
list of strings
[]
Required and non-empty when cre.enabled: true.
cre.group
string or null
null
Grouping column used in CRE construction.
cre.prefix
string
cre_mean_
Prefix for generated CRE mean terms.
pooling
Key
Type
Default
Rules
pooling.enabled
boolean
false (or true when model.type: pooled)
Cannot be true for model.type: re or cre.
pooling.grouping_vars
list of strings
[]
Required and non-empty when pooling is enabled.
pooling.map_path
string or null
null
Required when pooling is enabled. File must exist. Relative path resolves from config directory.
pooling.map_format
string or null
inferred from map_path extension
Must be csv or rds.
pooling.min_waves
integer or null
null
If set, must be positive integer.
Pooling map requirements at model-build time:
Must include a variable column.
Must include every column named in pooling.grouping_vars.
variable values must be unique.
transforms
Key
Type
Default
Rules
transforms.mode
string
fixed_formula
Currently only fixed_formula is supported.
transforms.sensitivity.enabled
boolean
false
If true, requires fit.method: optimise.
transforms.sensitivity.scenarios
list
[]
Required and non-empty when sensitivity is enabled.
Each sensitivity scenario requires:
name (unique, non-empty, not base)
formula (safe formula string unless unsafe mode is enabled)
priors
Key
Type
Default
Rules
priors.use_defaults
boolean
true
Must be true in current runner version.
priors.overrides
list
[]
Optional sparse overrides.
Prior override row contract:
parameter (string, must exist in model prior table)
family (normal or lognormal_ms, default normal)
mean (numeric)
sd (numeric, > 0)
lognormal_ms extra constraints:
mean > 0
allowed only for noise_sd and parameters matching sd_<index>[<term>]
boundaries
Key
Type
Default
Rules
boundaries.overrides
list
[]
Optional parameter boundary overrides.
Boundary override row contract:
parameter (string, must exist in model boundary table)
lower (numeric, default -Inf)
upper (numeric, default Inf)
time_components
Key
Type
Default
Rules
time_components.enabled
boolean
false
Master toggle.
time_components.holidays.enabled
boolean
false
Enables holiday feature generation.
time_components.holidays.calendar_path
string or null
null
Required when holidays are enabled. CSV or RDS. Relative path resolves from config directory.
Includes DSAMbayes version, schema version, model/fit metadata, and sessionInfo().
10_pre_run
File
Controlled by
Written when
Notes
transform_assumptions.txt
outputs.save_transform_assumptions_txt
flag is true
Written even if transform sensitivity scenarios are disabled.
transform_sensitivity_summary.csv
outputs.save_transform_sensitivity_summary_csv
sensitivity object exists with rows
Requires transforms.sensitivity.enabled: true and successful scenario execution.
transform_sensitivity_parameters.csv
outputs.save_transform_sensitivity_parameters_csv
sensitivity object exists with rows
Parameter means/SD by scenario.
dropped_groups.csv
none
groups dropped by pooling.min_waves filter
Written only when sparse groups are excluded.
holiday_feature_manifest.csv
none
managed holidays enabled and features generated
Documents generated holiday terms and active-week counts.
design_matrix_manifest.csv
outputs.save_design_matrix_manifest_csv
flag is true and manifest non-empty
Per-term design metadata.
data_dictionary.csv
outputs.save_data_dictionary_csv
flag is true and dictionary table non-empty
Merges inline YAML metadata and optional CSV dictionary metadata.
spec_summary.csv
outputs.save_spec_summary_csv
flag is true and table available
Single-row model/spec summary.
vif_report.csv
outputs.save_vif_report_csv
flag is true and predictors available
VIF diagnostics for non-intercept predictors.
20_model_fit
File
Controlled by
Written when
Notes
model.rds
outputs.save_model_rds
flag is true
Fitted model object.
posterior.rds
outputs.save_posterior_rds
flag is true and MCMC fit
Raw posterior object for MCMC runs only.
fit_metrics_by_group.csv
implicit
fitted summary is computed
Written when any of save_fitted_csv, save_fit_png, save_residuals_csv, save_diagnostics_png is true.
fit_timeseries.png
outputs.save_fit_png
flag is true and ggplot2 installed
Observed vs fitted over time.
fit_scatter.png
outputs.save_fit_png
flag is true and ggplot2 installed
Observed vs fitted scatter.
30_post_run
File
Controlled by
Written when
Notes
observed.csv
outputs.save_observed_csv
flag is true
Observed response on model response scale.
observed_kpi.csv
outputs.save_observed_csv
flag is true and response scale is log
KPI-scale observed values (exp) with conversion_method = point_exp.
fitted.csv
outputs.save_fitted_csv
flag is true
Fitted summaries on model response scale.
fitted_kpi.csv
outputs.save_fitted_csv
flag is true and response scale is log
KPI-scale fitted summaries (exp).
posterior_summary.csv
outputs.save_posterior_summary_csv
flag is true and MCMC fit
Posterior summaries for coefficients and scalar diagnostics.
optimisation_runs.csv
none
fit.method: optimise
All optimisation starts.
optimisation_best.csv
none
fit.method: optimise
Best run by RMSE.
Implementation note:
decomp_predictor_impact.csv, decomp_predictor_impact.png, decomp_timeseries.csv, and decomp_timeseries.png are present in stage mapping and config flags, but are not currently invoked by write_run_artifacts() in the active pipeline.
40_diagnostics
File
Controlled by
Written when
Notes
chain_diagnostics.txt
outputs.save_chain_diagnostics_txt
flag is true and MCMC fit
Chain diagnostics text output.
diagnostics_report.csv
outputs.save_diagnostics_report_csv
flag is true and diagnostics object exists
One row per diagnostic check.
diagnostics_summary.txt
outputs.save_diagnostics_summary_txt
flag is true and diagnostics object exists
Counts by status and overall status.
residuals.csv
outputs.save_residuals_csv
flag is true and fitted summary is computed
Residual table on response scale.
residuals_timeseries.png
outputs.save_diagnostics_png
flag is true and ggplot2 installed
Residuals over time.
residuals_vs_fitted.png
outputs.save_diagnostics_png
flag is true and ggplot2 installed
Residuals vs fitted.
residuals_hist.png
outputs.save_diagnostics_png
flag is true and ggplot2 installed
Residual histogram.
residuals_acf.png
outputs.save_diagnostics_png
flag is true and ggplot2 installed
Residual autocorrelation plot.
residual_diagnostics.csv
none
diagnostics residual checks available
Ljung-Box / ACF check outputs.
residuals_latent.csv
none
diagnostics latent residuals available
Latent residual series from diagnostics object.
residuals_latent_acf.png
outputs.save_diagnostics_png
latent residuals available and ggplot2 installed
Latent residual ACF plot.
boundary_hits.csv
none
boundary-hit table available
Boundary-hit rates per parameter.
boundary_hits.png
outputs.save_diagnostics_png
boundary-hit table available and ggplot2 installed
Boundary-hit visualisation.
within_variation.csv
none
within-variation table available
Within-variation diagnostics for hierarchical terms.
within_variation.png
outputs.save_diagnostics_png
within-variation table available and ggplot2 installed