aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-10-08 14:38:19 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2021-10-08 14:48:20 +0200
commit648637a60a9991cdc8d8d7cbe481cac7f36c953c (patch)
tree11481d01eb702a686cdcbe0c3fbe0e308ec2e322
parentaa36fb0c8000df44abb635c9ab490f478e0775b1 (diff)
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
-rw-r--r--R/nlmixr.R6
1 files 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"
)
}

Contact - Imprint