diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-25 09:36:15 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-25 09:36:15 +0200 |
commit | e5c955f82adf6139d76f842a0b85e5d383685793 (patch) | |
tree | d81f00619d581a0d1e02cccc873595a1d2148e83 /R | |
parent | f9e3f7964623530983f8c0665df06602d6283ff7 (diff) |
Fix internal naming of g for transform_fractions=FALSE
Diffstat (limited to 'R')
-rw-r--r-- | R/transform_odeparms.R | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/R/transform_odeparms.R b/R/transform_odeparms.R index f518ae32..e64bac59 100644 --- a/R/transform_odeparms.R +++ b/R/transform_odeparms.R @@ -76,9 +76,15 @@ transform_odeparms <- function(parms, mkinmod, }
}
}
+
+ # DFOP parameter g is treated as a fraction
if (!is.na(parms["g"])) {
g <- parms["g"]
- transparms["g_ilr"] <- ifelse(transform_fractions, ilr(c(g, 1 - g)), g)
+ if (transform_fractions) {
+ transparms["g_ilr"] <- ilr(c(g, 1 - g))
+ } else {
+ transparms["g"] <- g
+ }
}
return(transparms)
@@ -145,9 +151,14 @@ backtransform_odeparms <- function(transparms, mkinmod, }
}
}
+
+ # DFOP parameter g is treated as a fraction
if (!is.na(transparms["g_ilr"])) {
g_ilr <- transparms["g_ilr"]
- parms["g"] <- ifelse(transform_fractions, invilr(g_ilr)[1], g_ilr)
+ parms["g"] <- invilr(g_ilr)[1]
+ }
+ if (!is.na(transparms["g"])) {
+ parms["g"] <- transparms["g"]
}
return(parms)
|