From 441dde7f6eafb71ff6d375e57f173e382c83dc61 Mon Sep 17 00:00:00 2001 From: jranke Date: Mon, 16 Apr 2012 22:41:06 +0000 Subject: - Start of an adaptation of mkinfit, but it seems nothing is really needed - Tests suggest that mkinmod is still buggy git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@27 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- R/mkinfit.R | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'R') diff --git a/R/mkinfit.R b/R/mkinfit.R index f404356..64edaba 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -35,6 +35,9 @@ mkinfit <- function(mkinmod, observed, # Get the names of the state variables in the model mod_vars <- names(mkinmod$diffs) + # See which variant of the model specification was used + use_of_ff <- mkinmod$use_of_ff + # Subset observed data with names of observed data in the model observed <- subset(observed, name %in% names(mkinmod$map)) @@ -47,6 +50,9 @@ mkinfit <- function(mkinmod, observed, 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 + # 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 # Default values for formation fractions if (substr(parmname, 1, 2) == "f_") parms.ini[parmname] = 0.1 # Default values for the FOMC, DFOP and HS models -- cgit v1.2.1