Closed avehtari closed 1 month ago
It seems ess_mean()
exists but currently calls .ess(.split_chains(x))
. So it is not completely an alias of ess_basic()
as it doesn't allow for split = FALSE
Does the doc fix, already fix the issue you had Aki?
Doc fix is not enough if ess_mean()
has different behavior from ess_basic()
. I assume ess_mean()
is not currently exposed, and thus if an internal function is needed which calls .ess(.split_chains(x))
that could be calles .ess_mean()
and then make the alias as I suggested.
I think the issue was just that the doc of ess_mean was wrong so the function wasn't visible properly. The different behavior is because we want ess_basic to be able to turn off split_chains but for the other ess functions such as ess_mean, ess_sd, we always want to split chains.
I also discovered some other places where ess_mean was not mentioned in the doc. I will fix them.
Ah, so this actually works, and alias is not needed
> draws |> summarise_draws(mean, sd, ess_mean, ess_basic, mcse_mean)
# A tibble: 5 × 6
variable mean sd ess_mean ess_basic mcse_mean
<chr> <dbl> <dbl> <dbl> <dbl> <dbl>
1 b_Intercept 0.76 0.64 1586.54 1586.54 0.02
2 Intercept 0.76 0.64 1586.54 1586.54 0.02
3 lprior -1.59 0.27 1535.70 1535.70 0.01
4 lp__ -8.14 0.73 1718.75 1718.75 0.02
5 theta 0.67 0.13 1632.43 1632.43 0.00
I'll update my course slides to use ess_mean
Great! Updated some more of the docs. Will close this issue now since things seem to be now working and documented as expected.
I'm using
posterior
in teaching, and I realized it would be useful to haveess_mean()
as an alias foress_basic()
as we also haveess_quantile()
,ess_sd()
,mcse_mean()
,mcse_quantile()
, andmcse_sd()