Replaces the posterior draws of a brmsfit with samples regenerated from a compressed posterior, so the standard brms post-processing methods (predict(), posterior_predict(), pp_check(), conditional_effects(), ...) keep working with the lighter object.

reconstruct_brmsfit(x, n_draws = get_n_draws_from_fit(x$structure))

Arguments

x

The output of compress_brmsfit() (a list with compressed and structure), or a similarly-shaped list constructed from separately-saved objects.

n_draws

Integer number of samples to regenerate. Defaults to the original number of draws stored in x$structure.

Value

A brmsfit object with regenerated draws.

Details

MCMC diagnostics (Rhat, ESS, ...) are not preserved.