Skip to contents

summary.mixgpd_fit() computes posterior summaries for monitored model parameters.

Usage

# S3 method for class 'mixgpd_fit'
summary(object, pars = NULL, probs = c(0.025, 0.5, 0.975), ...)

Arguments

object

A fitted object of class "mixgpd_fit".

pars

Optional character vector of parameters to summarize. If NULL, summarize all (excluding v's).

probs

Numeric vector of quantiles to report.

...

Unused.

Value

An object of class "mixgpd_summary".

Details

The returned table is a parameter-level summary of the posterior draws, not a predictive summary. Use predict.mixgpd_fit for posterior predictive quantities such as densities, survival probabilities, quantiles, and means.

The summary respects the stored truncation metadata and reports WAIC if it was requested during MCMC.

Examples

# \donttest{
y <- abs(stats::rnorm(25)) + 0.1
bundle <- build_nimble_bundle(y = y, backend = "sb", kernel = "normal",
                             GPD = TRUE, components = 3,
                             mcmc = list(niter = 100, nburnin = 50, thin = 1, nchains = 1))
fit <- run_mcmc_bundle_manual(bundle)
#> [mixgpd] Validating configuration
#> [mixgpd] Checking build/compile cache
#> [mixgpd] Building model and MCMC configuration
#> [mixgpd] Compiling NIMBLE model
#> [mixgpd] Initializing chains
#> [mixgpd] Running MCMC
#> [mixgpd] Finalizing WAIC and diagnostics
#> [mixgpd] Assembling fit object
summary(fit, pars = c("alpha", "threshold"))
#> MixGPD summary | backend: Stick-Breaking Process | kernel: Normal Distribution | GPD tail: TRUE | epsilon: 0.025
#> n = 25 | components = 3
#> Summary
#> Initial components: 3 | Components after truncation: 3
#> 
#> Summary table
#>  parameter  mean    sd q0.025 q0.500 q0.975
#>      alpha 1.366 0.557  0.526  1.156  2.255
#>  threshold 0.118 0.001  0.117  0.117  0.121
# }