Closed jflournoy closed 3 months ago
Thanks for reporting this. Looks like an issue with too small log ratios. I might add a warning and not calculate the r_eff in this case, or it might need some further fixing.
A fix would be to change exp(-log_ratios)
to exp(-(log_ratios-max(log_ratios)))
This should be fixed now with @avehtari suggestion
In
priorsense::powerscale.priorsense_data
, r_eff is computed as part of the call tois_method
:https://github.com/n-kall/priorsense/blob/ee8dc8b4c3e2940e5206b0f1a54ccba7c15fd368/R/powerscale.R#L100-L105
Debuging this, it's specifically for the likelihood when alpha is 1.01 (and maybe other values):
I get the following error as a result of the call to
loo::relative_eff
in the above lines:I believe this is because
exp(-log_ratios)
evaluates to: