[R] estimating the starting value within a ODE using nls and lsoda

Thomas Petzoldt thpe at simecol.de
Thu Apr 8 22:17:48 CEST 2010


Hi Dave,

first of all, fitting starting values of a dynamic model the same way 
like its parameters is indeed the usual method. In that case parameters 
*and* some or all initial value(s) of the dynamic model are both in fact 
'parameters' for the statistical model fitting problem.

Fitting a nonlinear model can be easy or problematic or even impossible, 
depending on the data and the model structure. In such cases one speaks 
about "identifiability" and there are several methods that can help to 
find parameter combinations that can be identified simultaneously.

It is not important whether such a statistical parameter was
originally a 'parameter' or an 'initial value' of the dynamic model,
it simply depends on collinearity of the problem:

http://en.wikipedia.org/wiki/Multicollinearity


Several methods for identifiability analysis are provided in the CRAN 
package "FME" (Flexible Modelling Environment), which comes with 
extensive documentation (package vignettes as pdf files) and examples 
and there is a recent paper in the Journal of Statistical Software:

http://www.jstatsoft.org/v33/i03


Look for function 'collin' that implements a collinearity index.

In addition, function 'modFit', that is also in this package provides an 
interface to use different optimizers of R in a unique way, namely nls, 
nlminb, optim, nls.lm (from package minpack), and pseudoOptim, a 
pseudo-random search algorithm.

Another hint, because you are still using "odesolve" (from Woodrow 
Setzer). This package has now a direct and compatible successor 
"deSolve" (Soetaert, Petzoldt, Setzer), see:

http://www.jstatsoft.org/v33/i09

deSolve is even more stable than the former version and contains many 
many more solvers, not only lsoda and rk4, can handle other types of 
differential equations too and has much more documentation.

Hope it helps!

Thomas Petzoldt


PS: There is also a dedicated mailing list for such questions:
https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models



-- 
Thomas Petzoldt
Technische Universitaet Dresden
Institut fuer Hydrobiologie
01062 Dresden
GERMANY

http://tu-dresden.de/Members/thomas.petzoldt



More information about the R-help mailing list