aboutsummaryrefslogtreecommitdiff
path: root/R/transform_odeparms.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2019-02-21 14:34:45 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2019-02-21 14:50:27 +0100
commitd89e3d22eb9dc383897b09e9c5aa1b57f65cdbf0 (patch)
treee81237fcbd996390eadd439295f2fb4b3874b0ab /R/transform_odeparms.R
parentf134599b4d2cd3558b887b7f06faf1dfb599196e (diff)
Add the logistic model
Diffstat (limited to 'R/transform_odeparms.R')
-rw-r--r--R/transform_odeparms.R11
1 files changed, 6 insertions, 5 deletions
diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R
index c871c52a..f69f4ebd 100644
--- a/R/transform_odeparms.R
+++ b/R/transform_odeparms.R
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2014 Johannes Ranke
+# Copyright (C) 2010-2014,2019 Johannes Ranke
# Contact: jranke@uni-bremen.de
# This file is part of the R package mkin
@@ -71,8 +71,9 @@ transform_odeparms <- function(parms, mkinmod,
}
# Transform also FOMC parameters alpha and beta, DFOP and HS rates k1 and k2
- # and HS parameter tb if transformation of rates is requested
- for (pname in c("alpha", "beta", "k1", "k2", "tb")) {
+ # and HS parameter tb as well as logistic model parameters kmax, k0 and r if
+ # transformation of rates is requested
+ for (pname in c("alpha", "beta", "k1", "k2", "tb", "kmax", "k0", "r")) {
if (!is.na(parms[pname])) {
if (transform_rates) {
transparms[paste0("log_", pname)] <- log(parms[pname])
@@ -151,8 +152,8 @@ backtransform_odeparms <- function(transparms, mkinmod,
}
}
- # Transform parameters also for FOMC, DFOP and HS models
- for (pname in c("alpha", "beta", "k1", "k2", "tb")) {
+ # Transform parameters also for FOMC, DFOP, HS and logistic models
+ for (pname in c("alpha", "beta", "k1", "k2", "tb", "kmax", "k0", "r")) {
if (transform_rates) {
pname_trans = paste0("log_", pname)
if (!is.na(transparms[pname_trans])) {

Contact - Imprint