After testing the package with new compiled data sets from the literature on several pest developmental responses to temperature, the package failed to converge more than expected when comparing the outputs with the approach of nls.multstart package.
After rewriting the function fit_tpc() to work upon nls.multstart::nls_multstart() instead of nlme::gnls() and testing the modelling workflow to several data sets, the former (nls_multstart()) will be the chosen framework for this package due to three main aspects:
[1] It has more convergence success (more TPCs are obtained and can be depicted for model selection purposes)
[2] Not only more TPCs are succesfully fitted, but with better goodness-of-fit
[3] The speed is much higher especially for models with many parameters (i.e., > 5 parameters).
[4] Since our package is built upon rTPC package (Padfield et al. 2021), using the nls_multstart function from the same developers helps make the workflow more continuous with previous collective work (i.e., trying to extend the rTPC-nls.multstart framework towards applied purposes for pest risk assessment).
For that purpose, I will rewrite the fit_tpc function. Models from devRate package will be fitted with nlme-nls2 packages to obtain starting values but the core fitting function will turn to be nls.multstart::nls_multstart() instead of nlme::gnls(). This will imply ignoring variance structure modelling, which will remain as an enhancement future task.
After testing the package with new compiled data sets from the literature on several pest developmental responses to temperature, the package failed to converge more than expected when comparing the outputs with the approach of
nls.multstart
package.After rewriting the function
fit_tpc()
to work uponnls.multstart::nls_multstart()
instead ofnlme::gnls()
and testing the modelling workflow to several data sets, the former (nls_multstart()
) will be the chosen framework for this package due to three main aspects:[1] It has more convergence success (more TPCs are obtained and can be depicted for model selection purposes) [2] Not only more TPCs are succesfully fitted, but with better goodness-of-fit [3] The speed is much higher especially for models with many parameters (i.e., > 5 parameters). [4] Since our package is built upon
rTPC
package (Padfield et al. 2021), using thenls_multstart
function from the same developers helps make the workflow more continuous with previous collective work (i.e., trying to extend therTPC
-nls.multstart
framework towards applied purposes for pest risk assessment).For that purpose, I will rewrite the
fit_tpc
function. Models fromdevRate
package will be fitted withnlme
-nls2
packages to obtain starting values but the core fitting function will turn to benls.multstart::nls_multstart()
instead ofnlme::gnls()
. This will imply ignoring variance structure modelling, which will remain as an enhancement future task.