Summarize posterior draws from a one-arm fitted model
summary.mixgpd_fit.Rdsummary.mixgpd_fit() computes posterior summaries for monitored model
parameters.
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
# }