Skip to content

Commit

Permalink
fix use of ceiling in ps_tail_length
Browse files Browse the repository at this point in the history
  • Loading branch information
avehtari committed Nov 7, 2024
1 parent 90a07cc commit dd9f71e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/pareto_smooth.R
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ ps_convergence_rate <- function(k, ndraws, ...) {
#' @return tail length
#' @export
ps_tail_length <- function(ndraws, r_eff, ...) {
ifelse(ndraws > 225, ceiling(3 * sqrt(ndraws / r_eff)), ndraws / 5)
ceiling(ifelse(ndraws > 225, 3 * sqrt(ndraws / r_eff), ndraws / 5))
}

#' Pareto-k diagnostic message
Expand Down

0 comments on commit dd9f71e

Please sign in to comment.