Learn R Programming

qbrms (version 1.0.1)

prior_pp_diagnostics: Prior predictive diagnostics and sensibility report

Description

Summarise prior predictive draws to check basic support, scale and shape, and (optionally) how simple statistics of the observed data compare with the prior-predictive distribution. Returns an object with a concise verdict.

Usage

prior_pp_diagnostics(
  object,
  level = 0.95,
  support = NULL,
  lower = NULL,
  upper = NULL,
  trials = NULL,
  plausible_lower = NULL,
  plausible_upper = NULL,
  include_observed = TRUE,
  seed = NULL
)

Value

An object of class qbrms_prior_diagnostics.

Arguments

object

A qbrms prior object: qbrms_prior_fit, qbrms_prior_only, or a qbrms_fit that contains prior_samples.

level

Credible level for central intervals (default 0.95). Reserved.

support

Optional override of the implied support: one of "real", "positive", "proportion", or "bounded". If NULL, an attempt is made to infer from the family.

lower, upper

Optional numeric bounds used when support = "bounded". If support = "proportion", the default is c(0, 1).

trials

Optional integer vector for binomial data (bounds helper).

plausible_lower, plausible_upper

Optional numeric bounds defining a user-declared “plausible range” for the outcome on the response scale. When both are supplied, the function reports the fraction of prior-predictive mass that falls in [plausible_lower, plausible_upper] and incorporates this into the verdict.

include_observed

Logical; if TRUE and the object contains data, the report compares simple statistics of y to their prior-predictive reference distributions.

seed

Optional seed for reproducibility.