Extract the WAIC object from a brma model object.
The WAIC must first be computed using add_waic.
Arguments
- x
a brma model object.
- unit
output/deletion unit. See
add_loo.- ...
additional arguments (currently unused).
Value
An object of class "waic" as returned by
waic.
Details
This function extracts the WAIC object that was previously computed and
stored using object <- add_waic(object, unit = unit). If WAIC has not
been computed for the requested unit, an error is thrown.
This is the RoBMA S3 generic and brma method. The method is also
registered for waic, so loo::waic(fit) extracts
the cached WAIC object for brma fits. Use waic
directly for raw log-likelihood arrays or matrices.
In most cases, LOO-PSIS (via loo.brma) is preferred over WAIC
because it provides better estimates and includes diagnostics (Pareto k
values) that indicate when the approximation may be unreliable.