From dd9f71e14e27ab7af39ef734713fbaf6c40f88ce Mon Sep 17 00:00:00 2001 From: Aki Vehtari Date: Thu, 7 Nov 2024 12:10:05 +0200 Subject: [PATCH] fix use of ceiling in ps_tail_length --- R/pareto_smooth.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pareto_smooth.R b/R/pareto_smooth.R index 61e3705..61baf1f 100644 --- a/R/pareto_smooth.R +++ b/R/pareto_smooth.R @@ -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