aboutsummaryrefslogtreecommitdiff
path: root/R/mkinfit.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-05-10 21:53:00 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-05-10 21:53:00 +0200
commitd113cd79b178fdc91aecb894707ed356129dfb75 (patch)
treedc28e049e94eb3ee9745f9cd86387de96a894c93 /R/mkinfit.R
parentefab37957381919c21d874906ce870f4941c760a (diff)
Default to analytical for coupled models if available
This revealed that transforming rates is necessary for fitting the analytical solution of the SFO-SFO model to the FOCUS D dataset. Benchmarks show that fitting coupled models with deSolve got a bit slower through the latest changes
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r--R/mkinfit.R4
1 files changed, 2 insertions, 2 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index c33afbf0..e1089673 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -464,7 +464,7 @@ mkinfit <- function(mkinmod, observed,
if (solution_type == "eigen" && !is.matrix(mkinmod$coefmat))
stop("Eigenvalue based solution not possible, coefficient matrix not present.")
if (solution_type == "auto") {
- if (length(mkinmod$spec) == 1) {
+ if (length(mkinmod$spec) == 1 || is.function(mkinmod$deg_func)) {
solution_type = "analytical"
} else {
if (!is.null(mkinmod$cf) & use_compiled[1] != FALSE) {
@@ -694,7 +694,7 @@ mkinfit <- function(mkinmod, observed,
# Show parameter names if tracing is requested
if(trace_parms) cat(names_optim, "\n")
- # browser()
+ #browser()
# Do the fit and take the time until the hessians are calculated
fit_time <- system.time({

Contact - Imprint