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).
Unconditional CausalMixGPD: Stick-Breaking (SB) Backend with Tail Augmentation
Purpose: Demonstrate the stick-breaking backend (components = J) while augmenting the extreme tail with a GPD. This mirrors the CRP+GPD pipeline (ex03) but highlights the fixed-truncation behavior for bulk components.
What you’ll learn
How to combine SB truncation (components = J) with GPD tail augmentation (GPD = TRUE).
What stays invariant across backends in the wrapper-first workflow: bundle() → dpmgpd() → predict()/plot().
How to sanity-check tail impact using density/survival/high-quantile predictions.
When to use this template
You want tail augmentation and also want the computational predictability of a fixed-component SB mixture.
You want an explicit tuning knob (components) while iterating on model structure.
Next steps
Compare against CRP+GPD (ex03) to see how partition flexibility affects uncertainty.
# A tibble: 5 × 2
statistic value
<chr> <dbl>
1 N 200
2 Mean 2.33
3 SD 2.30
4 Min 0.328
5 Max 19.9
Threshold Selection
Code
thresholds <-quantile(y_tail, c(0.70, 0.75, 0.80, 0.85))u_threshold <- thresholds["80%"]ggplot(df_data, aes(x = y)) +geom_histogram(aes(y =after_stat(density)), bins =40, fill ="skyblue", alpha =0.6, color ="black") +geom_vline(xintercept = u_threshold, linetype ="dashed", color ="black") +labs(title =paste("Threshold at", round(u_threshold, 2)), x ="y", y ="Density") +theme_minimal()
Model Specification & Bundle
This follows the same structure as the SB bulk-only vignette (ex02): build a bundle with bundle(), run MCMC, then use the S3 predict() + plot() helpers. Compared with ex03 (CRP+GPD), here we keep the stick-breaking backend and use a Gamma bulk kernel with a lognormal threshold prior, then contrast it with a bulk-only Laplace fit.