From 099a35265858a2aa6d92e7dd102d22c0eaf4a1ca Mon Sep 17 00:00:00 2001 From: Aki Vehtari Date: Thu, 28 Mar 2024 19:13:35 +0200 Subject: [PATCH] fix pareto_smooth call with explicit argument --- R/args.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/args.R b/R/args.R index 3b63f13a..c5aa259b 100644 --- a/R/args.R +++ b/R/args.R @@ -1241,7 +1241,7 @@ process_init_approx <- function(init, num_procs, model_variables = NULL, draws_df$pareto_weight = exp(draws_df$lw - max(draws_df$lw)) } else { draws_df$pareto_weight = posterior::pareto_smooth( - exp(draws_df$lw - max(draws_df$lw)), tail = "right")[["x"]] + exp(draws_df$lw - max(draws_df$lw)), tail = "right", return_k=FALSE) } init_draws_df = posterior::resample_draws(draws_df, ndraws = num_procs, weights = draws_df$pareto_weight, method = "simple_no_replace")