From efe2d5cb17e67e3188c50a610c231423c5d86495 Mon Sep 17 00:00:00 2001 From: jranke Date: Tue, 5 Nov 2013 08:05:44 +0000 Subject: - 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 --- R/mkinfit.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1