CausalMixGPD
  • Home
  • Roadmaps
    • Website roadmap
    • Package roadmap
  • Start
    • Start Hub
    • Roadmap
    • Usage Diagrams
    • Start Here
    • Basic Compile and Run
    • Backends and Workflow
    • Troubleshooting
  • Tracks
    • Quickstart
    • Modeling (1-arm)
    • Causal
    • Clustering
    • Kernels & tails
    • Customization
  • Examples
  • Kernels
  • Advanced
  • Developers
  • Reference
    • Reference hub
    • Function reference by job
  • News
  • Cite
  • Coverage
  • API Reference

On this page

  • Layers
  • Call flow (non-causal)
  • Call flow (causal)
  • Prereqs
  • Outputs
  • Interpretation
  • Next

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

  1. Spec layer: compiles user inputs into a normalized internal specification.
  2. Contracts: enforce legal configurations and guard invariants early.
  3. Registry: routes kernel/tail choices to concrete implementations.
  4. Bundle + codegen: builds Nimble model code, constants/data, monitors, inits.
  5. MCMC: runs the sampler, returning fit objects with standardized slots.
  6. 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().

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

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.
(c) CausalMixGPD - Bayesian semiparametric modeling for heavy-tailed data
- - Cite - API - GitHub