fitdistrBayes-methods: Methods for Objective Bayesian Distribution Fits

fitdistrBayes-methodsR Documentation

Methods for Objective Bayesian Distribution Fits

Description

Methods for inspecting posterior summaries and draws, extracting posterior medians and credible intervals, producing standard diagnostic plots, simulating posterior predictive observations, and computing pointwise log-likelihood matrices. Prediction and pointwise log-likelihood are computed on demand. They are unavailable when the fitted object was created with control = list(store_callables = FALSE); inspect object$capabilities before calling them in reusable workflows.

Usage

## S3 method for class 'fitdistrBayes'
print(x, digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'fitdistrBayes'
summary(object, ...)
## S3 method for class 'summary.fitdistrBayes'
print(x,
  digits = max(3L, getOption("digits") - 3L), ...)
## S3 method for class 'fitdistrBayes'
coef(object, ...)
## S3 method for class 'fitdistrBayes'
confint(object, parm = object$model$parameters,
  level = 0.95, ...)
## S3 method for class 'fitdistrBayes'
as.data.frame(x, row.names = NULL,
  optional = FALSE, ...)
## S3 method for class 'fitdistrBayes'
plot(x,
  type = c("trace", "density", "acf", "pairs"),
  pars = x$model$parameters, ...)
## S3 method for class 'fitdistrBayes'
predict(object, draws = 1000L, size = 1L,
  seed = NULL, ...)
log_lik(object, ...)
## S3 method for class 'fitdistrBayes'
log_lik(object, draws = NULL, seed = NULL, ...)

Arguments

x, object

A fitted "fitdistrBayes" object.

digits

Number of printed significant digits.

parm

Parameter names for interval extraction.

level

Credible level.

row.names, optional

Arguments for data-frame conversion.

type

Diagnostic plot type.

pars

Optional subset of parameters.

draws

Number of posterior or predictive draws.

size

Number of observations in each predictive data set.

seed

Optional reproducibility seed passed to set.seed() before sampling posterior draws or posterior predictive observations.

...

Additional arguments.

Value

The returned value depends on the method:

  • print.fitdistrBayes() returns x, invisibly, and prints the model, prior, computational engine, posterior summaries, and diagnostic status.

  • summary.fitdistrBayes() returns an object of class "summary.fitdistrBayes". It is a list containing the original call; model, prior, initialization, and computational-engine records; the posterior summary table; the posterior-moment audit; convergence diagnostics; and the available prediction and log-likelihood capabilities.

  • print.summary.fitdistrBayes() returns x, invisibly, and prints the contents of the summary object.

  • coef.fitdistrBayes() returns a named numeric vector containing the posterior median of each estimated parameter. These medians are the default point estimates used by the package.

  • confint.fitdistrBayes() returns a numeric matrix with one row per requested parameter and two columns containing the lower and upper equal-tail posterior credible limits.

  • as.data.frame.fitdistrBayes() returns a data frame of the combined posterior draws. The columns .chain, .iteration, and .draw identify the simulation draw; the remaining columns contain parameter values.

  • plot.fitdistrBayes() returns x, invisibly, and produces the requested diagnostic plot as a side effect.

  • predict.fitdistrBayes() returns posterior predictive observations. It is a numeric vector of length draws when size = 1, and otherwise a numeric matrix with draws rows and size columns. Each row is one replicated data set generated after selecting a posterior draw.

  • log_lik() and log_lik.fitdistrBayes() return a numeric matrix whose rows correspond to posterior draws and whose columns correspond to observations. Each entry is that observation's log-likelihood contribution at the selected posterior draw.


fitdistrBayes documentation built on Aug. 30, 2026, 1:07 a.m.