traitecoevo / growth_trajectories

Code for reproducing http://doi.org/10.1101/083451
4 stars 2 forks source link

Better parameter estimates for tropical forests #13

Closed dfalster closed 8 years ago

dfalster commented 10 years ago
dfalster commented 9 years ago

in 98491c54c1abc57bda278f006b95c470204e0705 I reduced k_l0 so that better aligns with tropical data.

More generally, aligning model output with empirical estimates of dbh growth in figure 1 seems like an ideal candidate for model-data fusion

dfalster commented 9 years ago

More generally, want to fit model to data.

Spoke with @dsteinberg about possible techniques. Here's suggested way forward

  1. Initially setup using non-linear least squares solver, optimises fit over parameters
    • Could use Levenberg Marquardt algorithm (one of several possible). Typically needs derivatives, but for few dimensions (tens) can do these numerically.
    • probably do in R - gives us full control
    • generates single best fit parameter value. Many drawbacks to this, but good starting point.
  2. Then proceed into Bayesian framework to get full posterior distributions
    • possible use methods from Steinberg & Bonilla 2014 - uses variational Bayes to speed up parameter estimation, by assuming posterior is Guassian
  3. Then move into data fusion - constrain parameters using multiple sources of data
dfalster commented 9 years ago

@jscamac suggests using minpack.lm. According to this blog, the standard nls routine in R does not use the Levenberg-Marquardt approach, which "is more robust, i.e. finds a solution even if it starts very far off the final minimum. This is because its switching between Gauss-Newton and gradient descent.

jscamac commented 9 years ago

I've been using it to provide initials parameter values for the JAGS models. Still is highly susceptible to starting conditions though... but less so than nls() .

jscamac commented 9 years ago

This might also be more useful. http://cran.r-project.org/web/packages/gnm/index.html.

More details on custom equations here: http://stackoverflow.com/questions/26344429/fitting-generalized-nonlinear-model-in-r/26407073#26407073