flexp_fit(data, samp, start, fixed, boot=FALSE, windows=FALSE) flexp_nll(b, q, h, T, X, Y) flexp(X, b, q, h, T)
boot()
or manually, as required.boot()
?flexpnr
which does not). The capture rate (a) follows the following relationship:
$$a = b X^q$$
and then (a) is used to calculate the number of prey eaten (Ne) following the same relationship as hollingsII
:
$$N_e=\frac{a N_0 T}{1+a N_0 h}$$
where b is a search coefficient and other coefficients are as defined in hollingsII
. Indeed when $q = 0$, then $a = b$ and the relationship collapses to traditional type-II Holling's Disc Equation. There is, therefore, a useful test on $q = 0$ in the summary of the fit.
None of these functions are designed to be called directly, though they are all exported so that the user can call them directly if desired. The intention is that they are called via frair_fit
, which calls them in the order they are specified above.
flexp_fit
does the heavy lifting and also pulls double duty as the statistic
function for bootstrapping (via boot()
in the boot package). The windows
argument if required to prevent needless calls to require(frair)
on platforms that can manage sane parallel processing.
The core fitting is done by mle2
from the bbmle
package and users are directed there for more information. mle2
uses the flexp_nll
function to optimise flexp
.
Further references and recommended reading can be found on the help page for frair_fit.
Vucic-Pestic O, Rall BC, Kalinkat G, Brose U (2010) Allometric functional response model: body masses constrain interaction strengths. Journal of Animal Ecology 79: 249--256. doi:10.1111/j.1365-2656.2009.01622.x.
Flynn KJ, Fasham MJR, Hipkin CR (1997) Modelling the interactions between ammonium and nitrate uptake in marine phytoplankton. Philosophical Transactions of the Royal Society B: Biological Sciences 352: 1625--1645.
frair_fit
, flexpnr
.
data(bythotrephes)
# NB: The flexpnr model is not correct for the experimental design of the bythotrephes data
expofit <- frair_fit(eaten~density, data=bythotrephes,
response='flexpnr', start=list(b = 0.5, q = 1, h = 0.15),
fixed=list(T=1))
## Plot
plot(expofit)
lines(expofit, col=2)
## Inspect
summary(expofit$fit)
Run the code above in your browser using DataLab