From 8def5006fc81c032c3fc99751e062cdb32a81cc1 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 17 Jul 2014 14:34:20 +0200 Subject: Return complete list of initial states after fitting This is useful for specifying state.ini in a subsequent call to mkinfit --- R/mkinfit.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'R') diff --git a/R/mkinfit.R b/R/mkinfit.R index d591c42a..a8fbfc78 100644 --- a/R/mkinfit.R +++ b/R/mkinfit.R @@ -417,8 +417,11 @@ mkinfit <- function(mkinmod, observed, fit$bparms.optim <- bparms.optim fit$bparms.fixed <- bparms.fixed - # Return ode parameters for further fitting + # Return ode and state parameters for further fitting fit$bparms.ode <- bparms.all[mkinmod$parms] + fit$bparms.state <- c(bparms.all[setdiff(names(bparms.all), names(fit$bparms.ode))], + state.ini.fixed) + names(fit$bparms.state) <- gsub("_0$", "", names(fit$bparms.state)) fit$date <- date() -- cgit v1.2.1