Skip to contents

Print a MixGPD summary object

Usage

# S3 method for class 'mixgpd_summary'
print(x, digits = 3, max_rows = 60, show_ess = FALSE, ...)

Arguments

x

A "mixgpd_summary" object.

digits

Number of digits to print.

max_rows

Maximum rows to print.

show_ess

Logical; if TRUE, include the ess column when present.

...

Unused.

Value

x invisibly.

Details

This method formats the output of summary.mixgpd_fit(). It prints the model metadata, any stored WAIC value, the effective truncation information induced by epsilon, and the parameter-level posterior summary table.

The printed rows correspond to monitored posterior parameters. They are not predictions of densities, quantiles, or means, which should instead be obtained from predict.mixgpd_fit().

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)
#> 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
#>  weights[1]  0.632 0.072  0.516  0.658  0.744
#>  weights[2]  0.228 0.052  0.174  0.202  0.349
#>  weights[3]   0.14 0.046  0.052  0.137  0.212
#>       alpha  1.054  0.66  0.294  0.921  2.823
#>  tail_scale  0.496 0.186  0.198  0.468  0.832
#>  tail_shape -0.032 0.143 -0.216  0.071  0.118
#>   threshold   1.32 0.078  1.035  1.328  1.381
#>     mean[1]   0.53 0.031  0.468  0.523  0.573
#>     mean[2]  4.609 2.908  0.675  5.665  8.791
#>     mean[3]   3.55  3.02 -0.222  2.785  7.627
#>       sd[1]  0.341 0.043   0.32   0.32   0.43
#>       sd[2]  1.445  1.03  0.011  1.332  2.959
#>       sd[3]  1.489 1.045  0.108  1.588  3.853
# }