diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2021-06-17 13:58:34 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2021-06-17 13:58:34 +0200 |
commit | 05baf3bf92cba127fd2319b779db78be86170e5e (patch) | |
tree | 98b0c8c63badd2421afa5ebaf12530290ac9c571 /R/transform_odeparms.R | |
parent | 28197d5fcbaf85b39f4c032b8180d68b6f6a01b3 (diff) |
Let backtransform_odeparms handle nlmixr formation fractions
Also adapt summary.nlmixr.mmkin to correctly handle the way
formation fractions are translated to nlmixr
Diffstat (limited to 'R/transform_odeparms.R')
-rw-r--r-- | R/transform_odeparms.R | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R index 4fe4e5c2..174e7c2d 100644 --- a/R/transform_odeparms.R +++ b/R/transform_odeparms.R @@ -229,13 +229,18 @@ backtransform_odeparms <- function(transparms, mkinmod, if (length(trans_f) > 0) { if(transform_fractions) { if (any(grepl("qlogis", names(trans_f)))) { - parms[f_names] <- plogis(trans_f) + f_tmp <- plogis(trans_f) + if (any(grepl("_tffm0_.*_qlogis$", names(f_tmp)))) { + parms[f_names] <- invtffm0(f_tmp) + } else { + parms[f_names] <- f_tmp + } } else { - f <- invilr(trans_f) + f_tmp <- invilr(trans_f) if (spec[[box]]$sink) { - parms[f_names] <- f[1:length(f)-1] + parms[f_names] <- f_tmp[1:length(f_tmp)-1] } else { - parms[f_names] <- f + parms[f_names] <- f_tmp } } } else { |