From 648637a60a9991cdc8d8d7cbe481cac7f36c953c Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Fri, 8 Oct 2021 14:38:19 +0200 Subject: Round initial population values for nlmixr This avoids numerical instabilities that sometimes occur with the FOCEI algorithm in nlmixr when the initial values are very close to the optimum values --- R/nlmixr.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/nlmixr.R b/R/nlmixr.R index 55a7bdd7..fd12f555 100644 --- a/R/nlmixr.R +++ b/R/nlmixr.R @@ -361,10 +361,10 @@ nlmixr_model <- function(object, ini_block <- paste0( ini_block, parm_name, " = ", - as.character(degparms_start[parm_name]), + as.character(signif(degparms_start[parm_name], 2)), "\n", "eta.", parm_name, " ~ ", - as.character(eta_start[parm_name]), + as.character(signif(eta_start[parm_name], 2)), "\n" ) } @@ -422,7 +422,7 @@ nlmixr_model <- function(object, ini_block <- paste0( ini_block, parm_name, " = ", - as.character(errparms_ini[parm_name]), + as.character(signif(errparms_ini[parm_name], 2)), "\n" ) } -- cgit v1.2.1