Check the quality of the MCMC draws from the posterior distribution by checking whether the relative ESS is sufficiently large.
check_ESS(stan_fit, n_draws, threshold_lowESS = 0.4)
A warning message in case of detected problems.
A stanfit
object.
Number of MCMC draws.
A number in [0,1]
indicating the minimum acceptable
value of the relative ESS. See details.
check_ESS()
works as follows:
Extract the ESS from stan_fit
for each parameter of the model.
Compute the relative ESS (i.e. the ESS divided by the number of draws).
Check whether for any of the parameter the ESS is lower than threshold
.
If for at least one parameter the relative ESS is below the threshold,
a warning is thrown.