Setting initial parameter values

From DEBwiki
Jump to: navigation, search
AmP estimation

Data and completeness
Parameter estimation
Goodness-of-fit: SMSE / MRE
AmP Literature

Practice - essentials

Starting an estimation for a new species
Setting initial parameter values
Setting weight coefficients
Computing implied properties
Submitting to the collection

Practice - extra modules
Code specification
User-defined files: run, mydata, pars_init, predict
Data: Zero-variate, Univariate, Pseudo-data

Typified models
Estimation options

The Add-my-Pet estimation procedure offers three methods for reading (setting) initial parameters values. These are described in the following subsections.

Reading initial parameter values

Reading initial values from a file

The standard way to start estimation is reading the initial values from the file pars_init_my_pet. This is done by setting in run_my_pet: estim_options('pars_init_method', 2) and estim_options ('method', 'nm'). This file also specifies which parameters are to be estimated, by setting free = 1, and which ones should be kept fixed, (free = 0).

Using estim_options('results_output', 1) in run_my_pet, the results of the estimation are saved in file results_my_pet.mat in your local directory. With mat2pars_init you can copy the values from that .mat file to pars_init_my_pet.

To manually obtain a set of initial parameter values of astd model you can follow the nine steps presented in the Setting initial values manually section (see below).

Use values saved from previous runs

If you already saved values from a previous run in a results_my_pet.mat file, you can continue estimation using the resulting values as a new starting point, by setting estim_options('pars_init_method', 1) in run_my_pet. This is handy if the previous run did not yet result in a full converging to the global minimum of the loss function. Moreover, a new start restores the size of the simplex, reducing the risk of arriving at a local minimum that is not global.

Automatized setting of initial values

You can make use of an automatized method to find initial values based on the bijection between available zero-variate data and the DEB model parameters. You can directly study the theory in Lika et al 2014 (please send any questions or feedback to the authors).

In practice you need to open run_my_pet and set:

estim_options ('method', 'no') and estim_options('pars_init_method', 0)

You can access code and explanations in the DEBtool manual Toolbox: lib/pet (please scroll down to subsection 'automatized initial estimates').

Setting initial values manually

Nine steps procedure to manually find initial estimates for parameters of a std model

  1. Make sure that in run_my_pet: estim_options ('method', 'no') and estim_options('pars_init_method', 2)
  2. Choose all parameters equal to those of the generalized animal (which is done if you start with the default values in pars_init_my_pet).
  3. dV (called in pars_init_my_pet) returns a value of the specific density of structure, dV, according to the phylum or class of your pet. By default dV = dE , where dE is the specific density of reserve. Check that the value of dV returned by get_d_V is consistent with the real dry over wet weight ratios for your pet. Or else substantiate why you think that dVdE and how you derived dV. The generalised animal supposes dV = dE = 0.1 g/cm3 which gives a specific cost for structure, [EG] = 2800 J/ cm3.
  4. In pars_init_my_pet, modify the value of zoom factor z and execute run_my_pet until the predicted maximum weight equals the observed one; ignore all of the all other predictions.
  5. In pars_init_my_pet, modify the threshold values for maturity at birth EHb and puberty EHp, and execute run_my_pet until the model predictions more or less match the observed weights at birth and puberty; ignore all of the all other predictions.
  6. In pars_init_my_pet, modify the shape coefficient, δM, and execute run_my_pet until predicted lengths match observed lengths. First focus on the maximum length. If the weight predictions match, but the lengths at birth and puberty do not, check the consistency of the data:cubed length over weight should not vary too much for isomorphs.
  7. If the predicted ages at birth and puberty are really far off, modify the value of the energy conductance, v. Avoid deviating too much from the default value of 0.02 cm/d (lets say remain at most a factor 5 away from the value). If you increase v your ages will decrease but your weights will decrease as well because reserve will contribute less to weight. You might need to go back to step 4.
  8. Now focus on reproduction. A small decrease of the allocation fraction κ increases reproduction but decreases ultimate weight. Maximum reproduction as function of κ (all else the same) has an optimum around 0.5. It was found that two different parameter combinations are likely to fit growth and reproduction reasonably well as there exists two local minima of the weighted sum of least squares WLS. The first minima is obtained with a low value for κ (in combination with high values for maturity thresholds). The second minima is obtained with a large value for κ (in combination with low values for maturity thresholds). You probably want to have the combination that fits well for a high value of κ since this will have a global rather than a local minimum WLS.
  9. If you don't have ages, weights and/or length at stage transitions for several food densities, the value for the maturity rate coefficient, kJ, is poorly determined by the data. You might fix kJ at the default value (0.002 d-1). Alternatively, when it tends to become negative, you might assume kJ = kM, using an overwrite in predict_my_pet and set free.k_J = 0 in pars_init_my_pet. This will speed up computations substantially because the predicted lengths at birth and puberty become much simpler. After you arrived at an appropriate fit, you see if you can improve the result by removing this overwrite. Notice that the maturity maintenance (kJ × EHp) affects maximum reproduction and feeds back to step 8.