Theory: MCMC, posterior functionals, and prediction
Once the spliced bulk+tail model is specified, CausalMixGPD approximates the posterior distribution of the model parameters using MCMC (via nimble). The package then maps posterior draws to predictions and uncertainty intervals through a set of consistent posterior functional rules.
Posterior simulation targets
For a given dataset \(\mathcal{D}\), the posterior is
\[ p(\Theta,\Phi\mid \mathcal{D}) \propto L(\Theta,\Phi;\mathcal{D})\,p(\Theta,\Phi), \]
where \(L\) is the spliced likelihood and the prior structure follows the representation implied by the bulk DPM (SB or CRP) and the tail (GPD).
The wrappers take the core iteration controls through the mcmc argument (e.g., niter, nburnin, thin, nchains, and seed).
Convergence and diagnostics
Posterior simulation is typically run in multiple chains and checked using standard multi-chain diagnostics and trace-based visualizations.
The model object supports:
summary()for posterior summaries,plot()for diagnostic plots (trace, running mean, autocorrelation, and multi-chain diagnostics such as \(\hat{R}\) when multiple chains are used),params()as a lightweight extractor returning posterior mean parameters reshaped to natural dimensions.
For interval quantification, CausalMixGPD supports:
- equal-tailed credible intervals (posterior quantiles),
- HPD intervals (highest posterior density).
HPD intervals are computed from MCMC draws using established MCMC tooling.
Posterior functionals: densities, survival, quantiles, and mean-type summaries
The package’s key estimands are functionals of the conditional distribution \(F(\cdot\mid x)\).
The main targets are:
- density \(f(y\mid x)\) and survival \(S(y\mid x)=1-F(y\mid x)\),
- quantiles \(Q(\tau\mid x)\),
- mean-type summaries (including restricted means).
For generic scalar functionals \(T(\Theta,\Phi;x)\), the posterior estimate is formed draw-wise and then averaged:
\[ \widehat{T}(x)=\frac{1}{S}\sum_{s=1}^{S} T(\Theta^{(s)},\Phi^{(s)};x), \]
where \((\Theta^{(s)},\Phi^{(s)})\) are post-burn-in draws.
Mean-type summaries are handled via posterior predictive Monte Carlo within each posterior draw rather than direct plug-in evaluation.
Prediction for new covariates
For a new covariate value \(x^\star\), prediction targets the posterior predictive distribution:
\[ p(y^\star\mid x^\star,\mathcal{D}) = \int f(y^\star\mid x^\star;\Theta,\Phi)\,p(\Theta,\Phi\mid \mathcal{D})\,d\Theta\,d\Phi. \]
The predict() method returns posterior summaries for the same functional targets (density/survival grids, quantile indices, and mean-type summaries). For conditional models, newdata controls \(x^\star\); for marginal targets, the package uses training-data standardization by design.
References (key)
- de Valpine et al. (2017), Programming with Models: Writing Statistical Algorithms for General Model Structures with NIMBLE — doi:10.18637/jss.v076.i10
- nimble (package documentation), nimble — doi:10.32614/CRAN.package.nimble
- coda (package documentation), coda — https://cran.r-project.org/package=coda
- Gelman et al. (2013), Bayesian Data Analysis — doi:10.1201/b16018
- ggmcmc (package documentation), ggmcmc — doi:10.32614/CRAN.package.ggmcmc
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: Index
- 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.