aboutsummaryrefslogtreecommitdiff
path: root/R/nlmixr.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-06-12 11:05:24 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2021-06-12 11:05:24 +0200
commit88cf130615a6cde0c4e65d14db32fed7f6e43085 (patch)
treeac1ac824277825446b599f131d72b49a78677c7c /R/nlmixr.R
parent8bf6bd4289f1a0618376406a6a44dd99aedc692f (diff)
Small cosmetics
Diffstat (limited to 'R/nlmixr.R')
-rw-r--r--R/nlmixr.R20
1 files changed, 9 insertions, 11 deletions
diff --git a/R/nlmixr.R b/R/nlmixr.R
index 98783ca7..6e0b5128 100644
--- a/R/nlmixr.R
+++ b/R/nlmixr.R
@@ -43,11 +43,11 @@ nlmixr::nlmixr
#' ds <- lapply(experimental_data_for_UBA_2019[6:10],
#' function(x) subset(x$data[c("name", "time", "value")]))
#' names(ds) <- paste("Dataset", 6:10)
-#'
+#'
#' f_mmkin_parent <- mmkin(c("SFO", "FOMC", "DFOP", "HS"), ds, quiet = TRUE, cores = 1)
#' f_mmkin_parent_tc <- mmkin(c("SFO", "FOMC", "DFOP"), ds, error_model = "tc",
#' cores = 1, quiet = TRUE)
-#'
+#'
#' f_nlmixr_sfo_saem <- nlmixr(f_mmkin_parent["SFO", ], est = "saem")
#' f_nlmixr_sfo_focei <- nlmixr(f_mmkin_parent["SFO", ], est = "focei")
#'
@@ -278,20 +278,18 @@ nlmixr_model <- function(object,
conf.level = conf.level, random = TRUE)
degparms_optim <- degparms_mmkin$fixed
-
- degparms_optim <- degparms_mmkin$fixed
+ degparms_optim_back <- backtransform_odeparms(degparms_optim,
+ object[[1]]$mkinmod,
+ object[[1]]$transform_rates,
+ object[[1]]$transform_fractions)
+ degparms_optim_back_names <- names(degparms_optim_back)
+ names(degparms_optim_back_names) <- names(degparms_optim)
if (degparms_start[1] == "auto") {
degparms_start <- degparms_optim
}
degparms_fixed <- object[[1]]$bparms.fixed
- degparms_optim_back_names <- names(backtransform_odeparms(degparms_optim,
- object[[1]]$mkinmod,
- object[[1]]$transform_rates,
- object[[1]]$transform_fractions))
- names(degparms_optim_back_names) <- names(degparms_optim)
-
odeini_optim_parm_names <- grep('_0$', names(degparms_optim), value = TRUE)
odeini_fixed_parm_names <- grep('_0$', names(degparms_fixed), value = TRUE)
@@ -307,7 +305,7 @@ nlmixr_model <- function(object,
ini_block <- "ini({"
# Initial values for all degradation parameters
- for (parm_name in names(degparms_optim)) {
+ for (parm_name in names(degparms_start)) {
# As initials for state variables are not transformed,
# we need to modify the name here as we want to
# use the original name in the model block

Contact - Imprint