Study specifications

The model-and-parameters half of a study, shared by sensitivity analysis and calibration.

ModelManager.StudySpecType
StudySpec(inputs::InputFolders, variations; kwargs...)
StudySpec(reference::AbstractMonad, variations; kwargs...)

The model-and-parameters half of a study, built once and used for either sensitivity analysis or calibration.

A sensitivity sweep and a calibration ask different questions of the same model varied over the same parameters. StudySpec is that shared half — the input folders, the parameters, the baseline to vary from, and how many replicates to run — so it need not be restated when the second question follows the first.

Arguments

  • inputs: the model's input folders. The reference form takes them from a monad instead, along with its variation ID as the baseline.
  • variations: a vector of AbstractVariations, or several passed individually.

Keywords

  • reference_variation_id: the baseline to vary from. Defaults to VariationID(inputs); the reference form takes it from the monad and does not accept this keyword.
  • n_replicates: replicates per parameter set (default 1).
  • use_previous: reuse matching simulations that have already run (default true). Sensitivity only — calibration reuses through its own SimulationBank, so this field is ignored there.

What it deliberately does not hold

observed_data, summary_statistic and distance stay on CalibrationProblem, and functions stays on the sensitivity entry point. A sensitivity study has no observed data, and a field that half the consumers ignore is how a shared abstraction rots.

The user's own variations are kept rather than normalised, because the reverse conversion is lossy: a DistributedVariation's display name does not survive it, and the generation CSVs are keyed by that name.

Examples

spec = StudySpec(inputs, [dv1, dv2]; n_replicates=3)

# Sensitivity, then calibration, over the same spec
gsa  = run(MOAT(), spec; functions=[finalCount])
prob = CalibrationProblem(spec, observed, summarize, mseDistance)
res  = run(ABCSMC(population_size=64), prob)

# From a monad, which supplies both the inputs and the baseline variation
spec2 = StudySpec(reference_monad, [dv1, dv2])
source