This function provides a sensible test of the optimised coefficients between two functional responses fitted by frair_fit
. This is achieved by explicitly modelling a 'difference' (delta) parameter for each optimised variable following the advice outlined in Juliano (2001). Briefly, consider the following Hollings type-II model:
a*X*T/(1+a*X*h)
the model containing delta parameters becomes:
(a-Da*grp)*X*T/(1+(a-Da*grp)*X*(h-Dh*grp))
where grp
is a dummy coding variable and Da
and Dh
are the delta parameters. Here, the first functional response fit (frfit1
) is coded grp=0
and the second fit (frfit2
) is coded grp=1
. ThereforeDa
and Dh
represent the difference between the two modelled coefficients and the standard output from the maximum likelihood fitting explicitly tests the null hypothesis of no difference between the two groups.
The difference model is re-fit to the combined data in frfit1
and frfit2
using the same maximum likelihood approaches outlined in frair_fit
.
This function could be seen as a less computationally intensive alternative to bootstrapping but relies on mle2
successfully returning estimates of the standard error. mle2
does this by inverting a Hessian matrix, a procedure which might not always be successful.
Future versions of FRAIR will look to improve the integration between mle2
and allow users access to the various Hessian control parameters. In the meantime, the following delta functions are exported so users can 'roll their own' maximum likelihood implementation using this approach:
Original Function | Difference Function | Difference NLL Function |
typeI | typeI_diff | typeI_nll_diff |
hollingsII | hollingsII_diff | hollingsII_nll_diff |
rogersII | rogersII_diff | rogersII_nll_diff |
hassIII | hassIII_diff | hassIII_nll_diff |
hassIIInr | hassIIInr_diff | hassIIInr_nll_diff |
emdII | emdII_diff | emd_nll_diff |
flexp | flexp_diff | flexp_nll_diff |
flexpnr | flexpnr_diff | flexpnr_nll_diff |