Print the priors used by an AME / LAME / ame_als fit
Source:R/ame_als_methods_extra.R
prior_summary.RdBayesian-hygiene helper modelled on rstanarm::prior_summary().
Prints recorded prior settings and the coefficient-prior specification
saved by the fitting build. Older fits without that specification are
identified explicitly; their prior is not inferred from the current build. For ame_als fits it describes the empirical-Bayes
priors of the fast fit, whose variances are estimated from the data.
Usage
prior_summary(object, ...)
# Default S3 method
prior_summary(object, ...)
# S3 method for class 'ame'
prior_summary(object, ...)
# S3 method for class 'lame'
prior_summary(object, ...)
# S3 method for class 'ame_als'
prior_summary(object, ...)Examples
set.seed(1)
n <- 12
Y <- matrix(rnorm(n * n), n, n); diag(Y) <- NA
# chains = 1 keeps the example short; the default runs two chains and compares them
fit <- ame(Y, R = 1, nscan = 20, burn = 5, odens = 1, verbose = FALSE, chains = 1)
prior_summary(fit)
#>
#> ── Recorded prior settings (ame fit) ──
#>
#> Regression coefficients have a zero-mean design-based Gaussian g-prior,
#> independent of residual s2, with a proportional numerical ridge and additional
#> intercept variance; see rbeta_ab_fc().
#> `g` (top-level argument) = 103.4608
#> Note: `g` is set at top level on `ame()` -- not inside `prior = list(...)`.
#> `Sab0` = "matrix(c(0.0754, 0, 0, 0.0754), 2, 2)"
#> `eta0` = "4"
#> `Suv0` = "matrix(c(0.2745, 0, 0, 0.2745), 2, 2)"
#> `kappa0` = "4"
#> Resolved residual-variance prior scale = 0.783793783125805