diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-17 14:34:20 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-07-17 14:34:20 +0200 |
commit | 8def5006fc81c032c3fc99751e062cdb32a81cc1 (patch) | |
tree | 7e93b84c99c50fad930ef4edc642be3c108af91c /R/mkinfit.R | |
parent | d2c1ab854491ff047135fa8377400a68499e72de (diff) |
Return complete list of initial states after fitting
This is useful for specifying state.ini in a subsequent call to mkinfit
Diffstat (limited to 'R/mkinfit.R')
-rw-r--r-- | R/mkinfit.R | 5 |
1 files changed, 4 insertions, 1 deletions
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()
|