aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-04-14 12:42:06 +0000
committerjranke <jranke@edb9625f-4e0d-4859-8d74-9fd3b1da38cb>2013-04-14 12:42:06 +0000
commit6168089ac43664c10ca2dc1281c8648fbf3b35a9 (patch)
tree1ac85698d15ccdf4b70c97fa8b88641c98f236c8 /man
parent19537674a67c7b52ceb310bd47c0c2c04830ffb8 (diff)
- Update the TODO list, setting some requirements for version 1.0
- Check that initial values specified using parms.ini are actually needed for the model, stop otherwise - List all formation fractions in the same place in the summary, also if they were fitted in the model - Include an FOMC model coupled to two metabolites in the unit tests - Some updates needed because of the above - Update of static documentation including the vignettes - Update of the mkin vignettes in the vignettes directory git-svn-id: svn+ssh://svn.r-forge.r-project.org/svnroot/kinfit/pkg/mkin@82 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
Diffstat (limited to 'man')
-rw-r--r--man/mkinfit.Rd42
1 files changed, 42 insertions, 0 deletions
diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd
index 319b1b35..445bce2e 100644
--- a/man/mkinfit.Rd
+++ b/man/mkinfit.Rd
@@ -15,6 +15,8 @@ mkinfit(mkinmod, observed,
state.ini = c(100, rep(0, length(mkinmod$diffs) - 1)),
fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1],
solution_type = "auto",
+ method.modFit = "Marq",
+ control.modFit = list(),
plot = FALSE, quiet = FALSE, err = NULL, weight = "none",
scaleVar = FALSE,
atol = 1e-8, rtol = 1e-10, n.outtimes = 100,
@@ -38,6 +40,13 @@ mkinfit(mkinmod, observed,
A named vector of initial values for the parameters, including parameters to
be optimised and potentially also fixed parameters as indicated by \code{fixed_parms}.
If set to "auto", initial values for rate constants are set to default values.
+ Using parameter names that are not in the model gives an error.
+
+ It is possible to only specify a subset of the parameters that the model
+ needs. You can use the parameter lists "bparms.ode" from a previously
+ fitted model, which contains the differential equation parameters from this
+ model. This works nicely if the models are nested. An example is given
+ below.
}
\item{state.ini}{
A named vector of initial values for the state variables of the model. In case the
@@ -65,6 +74,15 @@ mkinfit(mkinmod, observed,
using eigenvalues and eigenvectors, and finally "deSolve" for the remaining
models (time dependence of degradation rates and metabolites).
}
+ \item{method.modFit}{
+ The optimisation method passed to \code{\link{modFit}}. The default "Marq" is the Levenberg Marquardt
+ algorithm \code{\link{nls.lm}} from the package \code{minpack.lm}. Often other methods need
+ more iterations to find the same result. When using "Pseudo", "upper" and "lower" need to be
+ specified for the transformed parameters.
+ }
+ \item{control.modFit}{
+ Additional arguments passed to the optimisation method used by \code{\link{modFit}}.
+ }
\item{plot}{
Should the observed values and the numerical solutions be plotted at each stage
of the optimisation?
@@ -120,6 +138,30 @@ SFO_SFO <- mkinmod(
fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
str(fit)
summary(fit)
+
+# Use stepwise fitting, using optimised parameters from parent only fit, FOMC
+\dontrun{
+FOMC <- mkinmod(parent = list(type = "FOMC"))
+FOMC_SFO <- mkinmod(
+ parent = list(type = "FOMC", to = "m1", sink = TRUE),
+ m1 = list(type = "SFO"))
+# Fit the model to the FOCUS example dataset D using defaults
+fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D)
+# Use starting parameters from parent only FOMC fit (not really needed in this case)
+fit.FOMC = mkinfit(FOMC, FOCUS_2006_D)
+fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D, parms.ini = fit.FOMC$bparms.ode, plot=TRUE)
+}
+
+# Use stepwise fitting, using optimised parameters from parent only fit, SFORB
+SFORB <- mkinmod(parent = list(type = "SFORB"))
+SFORB_SFO <- mkinmod(
+ parent = list(type = "SFORB", to = "m1", sink = TRUE),
+ m1 = list(type = "SFO"))
+# Fit the model to the FOCUS example dataset D using defaults
+fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D)
+# Use starting parameters from parent only SFORB fit (not really needed in this case)
+fit.SFORB = mkinfit(SFORB, FOCUS_2006_D)
+fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode, plot=TRUE)
}
\keyword{ models }
\keyword{ optimize }

Contact - Imprint