Potentially useful for doing some advanced stuff, but should not be used in regular workflow. Use recompute_SBC_statistics() to update an [SBC_results] objects with different thin_ranks or other settings.

SBC_statistics_from_single_fit(
  fit,
  variables,
  generated,
  thin_ranks,
  ensure_num_ranks_divisor,
  dquants,
  backend,
  gen_quants = NULL
)

Arguments

thin_ranks

how much thinning should be applied to posterior draws before computing ranks for SBC. Should be large enough to avoid any noticeable autocorrelation of the thinned draws See details below.

ensure_num_ranks_divisor

Potentially drop some posterior samples to ensure that this number divides the total number of SBC ranks (see Details).

dquants

Derived quantities to include in SBC. Use derived_quantities() to construct them.

backend

the model + sampling algorithm. The built-in backends can be constructed using SBC_backend_cmdstan_sample(), SBC_backend_cmdstan_variational(), SBC_backend_rstan_sample(), SBC_backend_rstan_optimizing() and SBC_backend_brms(). (more to come: issue 31, 38, 39). The backend is an S3 class supporting at least the SBC_fit(), SBC_fit_to_draws_matrix() methods.

gen_quants

Deprecated, use dquants instead