Skip to contents

params() reshapes posterior mean summaries back into the parameter layout implied by the fitted model specification.

Usage

params(object, ...)

Arguments

object

A fitted object of class "mixgpd_fit".

...

Unused.

Value

An object of class "mixgpd_params" (a named list). For causal fits, params() returns a treated/control pair and includes a ps block when a propensity-score model was fitted.

Details

This extractor is intended for structural inspection of the fitted model. Scalar quantities remain scalar, component-specific parameters are returned as vectors, and linked regression blocks are returned as matrices with covariate names as columns when available. If propensity-score adjustment is active for a linked bulk parameter, its coefficient is folded into the returned beta matrix as a leading "PropScore" column.

For a spliced model, the extractor returns posterior means of the bulk mixture parameters together with component-level threshold, tail-scale, and tail-shape terms. When tail terms are link-mode, the corresponding component-by-covariate beta blocks are returned.

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
params(fit)
#> Posterior mean parameters
#> 
#> $alpha
#> [1] 0.7618
#> 
#> $w
#> [1] 0.90370 0.08178
#> 
#> $mean
#> [1] 2.497 1.934
#> 
#> $sd
#> [1] 1.133 1.396
#> 
#> $threshold
#> [1] 0.09749
#> 
#> $tail_scale
#> [1] 1.039
#> 
#> $tail_shape
#> [1] -0.04916
p <- params(fit)
# }