diff options
author | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-04-15 22:49:57 +0000 |
---|---|---|
committer | jranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb> | 2012-04-15 22:49:57 +0000 |
commit | c373c1395a7656e8c06fab3688aae9562469cf60 (patch) | |
tree | b0c68c8c1d16ea2f9132fdb4504510b61319b5b9 /R/mkinmod.R | |
parent | 5587e833e0898e687466129dbc14950ddd58f1e0 (diff) |
- Fixed the SFORB coefficient matrix, at least for the case where parent is SFORB
- This version works but is slower and less stable than mkin 0.8-11
- mkinplot is not adapted to this version
git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@25 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R/mkinmod.R')
-rw-r--r-- | R/mkinmod.R | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/R/mkinmod.R b/R/mkinmod.R index 37f96ce3..80959326 100644 --- a/R/mkinmod.R +++ b/R/mkinmod.R @@ -145,11 +145,18 @@ mkinmod <- function(...) m <- matrix(nrow=n, ncol=n, dimnames=list(boxes, boxes))
for (from in boxes) {
for (to in boxes) {
- if (from == to) {
+ if (from == to) { # diagonal elements
k.candidate = paste("k", from, sep="_")
m[from,to] = ifelse(k.candidate %in% model$parms,
paste("-", k.candidate), "0")
- } else {
+ if(grepl("_free", from)) { # add transfer to bound compartment for SFORB
+ m[from,to] = paste(m[from,to], "-", paste("k", from, "bound", sep="_"))
+ }
+ if(grepl("_bound", from)) { # add backtransfer to free compartment for SFORB
+ m[from,to] = paste("- k", from, "free", sep="_")
+ }
+ m[from,to] = m[from,to]
+ } else { # off-diagonal elements
f.candidate = paste("f", from, "to", to, sep="_")
k.candidate = paste("k", from, to, sep="_")
k.candidate = sub("free.*bound", "free_bound", k.candidate)
|