Repository navigation
Don't use r_eff for computing ps_tail_length - #478
florence-bockting wants to merge 5 commits into
Conversation
|
This is how benchmark results would change (along with a 95% confidence interval in relative change) if 6831294 is merged into master:
|
I assume this means there will be only one warning line (possibly with a count) in case of repeated calls? |
|
I don't really have time to review this right now. Would @avehtari 's review be sufficient? |
Without count. Its not collecting warnings, but rather catches early when r_eff is not Null and sets it then to Null, such that downstream functions do not warn anymore. |
I see the warnings, but I don't see where it is set to NULL |
The rvar methods take r_eff as a named argument. They warn once, then call the default method for each element without r_eff. However, when you call the methods multiple times this will give you multiple warnings. |
|
Is it possible that some other package calls this or some posterior function repeatedly with non-null r_eff? |
Summary
Closes #446.
ps_tail_length()now depends onndrawsonly:floor(3 * sqrt(ndraws))ifndraws > 225, andfloor(ndraws / 5)otherwise.r_effstays in the signatures ofps_tail_length(),pareto_khat(),pareto_diags(), andpareto_smooth(), so existing calls do not break. A value other thanNULLgives a warning of classposterior_warning_pareto_r_eff_ignored.Changes:
r_effnow gives a warning.rvarmethods give the warning once, not once for each element.pareto_pit()usedr_eff = 1before, so its results do not change.r_effdoes not change khat, a non-NULLvalue warns (also withndraws_tail), thervarmethods warn once, andps_tail_length()values forndrawsabove and below 225.r_efffrom 3 older test calls.ps_tail_length()docs give the formula and say that it differs from Appendix H.man-roxygen/args-pareto.Rnow linksndraws_tailtops_tail_length(). This also removes the old text, which saidceilingbut the code usesfloor.?posterior.AI assistance: I used LLMs in this PR.
Copyright and Licensing
Copyright holder: Aalto University
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses: