From 3e24291bcca0daccc67b28e5667ad34b974b918b Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Fri, 22 Mar 2024 11:56:27 +0000 Subject: [PATCH] actually use pathfinder --- R/estimate_infections.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/estimate_infections.R b/R/estimate_infections.R index 3f9ba9c8e..75d6845cd 100644 --- a/R/estimate_infections.R +++ b/R/estimate_infections.R @@ -547,8 +547,10 @@ fit_model_approximate <- function(args, future = FALSE, id = "stan") { } else if (inherits(stan_args$object, "CmdStanModel")) { if (method == "vb") { sample_func <- stan_args$object$variational - } else { + } else if (method == "laplace") { sample_func <- stan_args$object$laplace + } else { + sample_func <- stan_args$object$pathfinder } stan_args$object <- NULL }