Check the quality of the MCMC draws from the posterior distribution by checking whether the relative ESS is sufficiently large.
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.