sequenceDiagram participant U as User participant S as compile_model_spec() participant R as kernel registry participant B as bundle() participant M as mcmc() participant F as mixgpd_fit U->>B: bundle(...) B->>S: compile spec S->>R: validate + route kernel/tail B->>M: bundle (code/data/constants) M->>F: fit object U->>F: summary/plot/predict
Architecture overview
This page is the contributor mental model: what depends on what, and where to make changes safely.
For user-facing examples and guides, prefer wrapper entry points (dpmix() / dpmgpd() for one-arm and dpmix.causal() / dpmgpd.causal() for causal). This page focuses on the internal execution path (bundle() -> mcmc()) used by contributors.
Layers
- Spec layer: compiles user inputs into a normalized internal specification.
- Contracts: enforce legal configurations and guard invariants early.
- Registry: routes kernel/tail choices to concrete implementations.
- Bundle + codegen: builds Nimble model code, constants/data, monitors, inits.
- MCMC: runs the sampler, returning fit objects with standardized slots.
- S3 surface: predict/plot/summary that should never need to know implementation details.
Call flow (non-causal)
Default user path: dpmix(...) / dpmgpd(...). Internal path shown below: bundle() then mcmc().
Call flow (causal)
Default user path: dpmix.causal(..., treat=...) / dpmgpd.causal(..., treat=...). Internal path shown below: bundle() then mcmc().
sequenceDiagram participant U as User participant C as bundle() participant P as PS sub-bundle participant M as mcmc() participant Q as qte()/ate() U->>C: bundle(...) C->>P: build + run PS (optional) U->>M: mcmc(...) M->>Q: derive estimands
Prereqs
- Required packages and data for this page are listed in the setup chunks above.
Outputs
- This page renders model fits, diagnostics, and summary artifacts generated by package APIs.
Interpretation
- Canonical concept page: Spec And Contracts
- Treat this page as an application/example view and use the canonical page for core definitions.
Next
- Continue to the linked canonical concept page, then return for implementation-specific details.