aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-11-05 08:05:44 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-11-05 08:05:44 +0000
commitefe2d5cb17e67e3188c50a610c231423c5d86495 (patch)
tree825f9340ecb05e5ec06b07f24568970e04e9484c /R/mkinfit.R
parent5aed88cadfd98defe12ffebd27ff5d199cc34edd (diff)
- Use an increasing small numeric value instead of random numbers for generating different default values for
kinetic rate constants to increase transparency and reproducibility. This also works nicely. - Remove an outdated comment from the test script. git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@137 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R6
1 files changed, 5 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 2012755..d04d1ea 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -57,10 +57,14 @@ mkinfit <- function(mkinmod, observed,
" not used in the model")
}
+ k_salt = 0
defaultpar.names <- setdiff(mkinmod$parms, names(parms.ini))
for (parmname in defaultpar.names) {
# Default values for rate constants, depending on the parameterisation
- if (substr(parmname, 1, 2) == "k_") parms.ini[parmname] = 0.1 + runif(1)/1e6
+ if (substr(parmname, 1, 2) == "k_") {
+ parms.ini[parmname] = 0.1 + k_salt
+ k_salt = k_salt + 1e-4
+ }
# Default values for rate constants for reversible binding
if (grepl("free_bound$", parmname)) parms.ini[parmname] = 0.1
if (grepl("bound_free$", parmname)) parms.ini[parmname] = 0.02

Contact - Imprint