From c1d97724bed6278279b7a0433e38db61e1eda783 Mon Sep 17 00:00:00 2001 From: Sebastian Funk Date: Fri, 22 Sep 2023 19:37:07 +0100 Subject: [PATCH] fix bounds of initial conditions for delays --- R/create.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/create.R b/R/create.R index 0e5098b74..65614c2d4 100644 --- a/R/create.R +++ b/R/create.R @@ -513,8 +513,12 @@ create_initial_conditions <- function(data) { init_fun <- function() { out <- list() if (data$delay_n_p > 0) { + out$delay_mean <- array(rep(0, data$delay_n_p)) + lower_bounds <- rep(-Inf, data$delay_n_p) + ## gamma + lower_bounds[data$dist == 1] <- 0 out$delay_mean <- array(truncnorm::rtruncnorm( - n = data$delay_n_p, a = 0, + n = data$delay_n_p, a = lower_bounds, mean = data$delay_mean_mean, sd = data$delay_mean_sd * 0.1 )) out$delay_sd <- array(truncnorm::rtruncnorm(