Website workflow note. This page reflects the current exported API and recommended wrapper-first usage. Last updated: 2026-02-19 .
For the full package narrative, see the main package vignettes (basic, unconditional, conditional, and causal).
Workflow roadmap
Quick start
This vignette gives a minimal, fully working workflow for an unconditional model and a conditional model. Everything uses short MCMC runs so the vignette renders quickly.
Unconditional Model (CRP, bulk-only)
Code
data ("nc_pos200_k3" )
y <- nc_pos200_k3$ y
Code
bundle_uncond <- bundle (
y = y,
backend = "crp" ,
kernel = "gamma" ,
GPD = FALSE ,
components = 5 ,
mcmc = mcmc
)
Code
fit_uncond <- load_or_fit ("quickstart-start-here-fit_uncond" , quiet_mcmc (dpmix (bundle_uncond, mcmc = list (show_progress = FALSE ))))
summary (fit_uncond)
Code
pred_q <- predict (fit_uncond, type = "quantile" , p = c (0.5 , 0.9 ), interval = "credible" )
head (pred_q$ fit)
plot (pred_q)
Conditional Model (SB, bulk-only)
Code
data ("nc_posX100_p3_k2" )
yc <- nc_posX100_p3_k2$ y
X <- as.matrix (nc_posX100_p3_k2$ X)
Code
bundle_cond <- bundle (
y = yc,
X = X,
backend = "sb" ,
kernel = "lognormal" ,
GPD = FALSE ,
components = 5 ,
mcmc = mcmc
)
Code
fit_cond <- load_or_fit ("quickstart-start-here-fit_cond" , quiet_mcmc (dpmix (bundle_cond, mcmc = list (show_progress = FALSE ))))
summary (fit_cond)
Code
x_new <- X[1 : 20 , , drop = FALSE ]
pred_mean <- predict (fit_cond, newdata = x_new, type = "mean" , interval = "credible" , nsim_mean = 200 )
head (pred_mean$ fit)
plot (pred_mean)
Useful S3 Methods
Code
params (fit_uncond)
plot (fit_uncond, family = c ("traceplot" , "running" ))
Next Steps
start/roadmap: workflow map and routing
examples/ex01: full three-phase workflow (spec -> bundle -> MCMC)
examples/ex01-ex08: unconditional/conditional models with and without GPD
examples/ex09-ex14: causal workflows
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: Start Here
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.