Implements the phenomenological test of type-II versus type-III functional responses described by Juliano (2001)
frair_test(formula, data)
# S3 method for frtest
print(x, ...)
frair_test
returns a list of class frtest
with the following items:
The original call to frair_test
.
The original x data supplied to frair_test
.
The proportion of prey eaten: \(y/x\)
A string. The right hand side of formula
.
A string. Always 'Proportion'
.
The output from the type-II glm
The output form the type-III glm
A simple formula of the form y ~ x
.
The dataframe containing x
and y
.
Output from frair_test
.
Other items passed to the print method.
Daniel Pritchard
This function wraps up an otherwise trivial test for type-II versus type-III functional responses in a format consistent with the FRAIR syntax. It can be considered 'phenomenological' inasmuch as it tells the user if a type-II or type-III response is preferred, but not what form that curve should take nor if it is sensible to fit such a curve via non-linear regression.
The test relies on the established principle that a logistic regression on the proportion of prey consumed is a more sensitive test of functional response shape, especially at low prey densities, when a non-linear curve may not be able to distinguish the subtle difference in curve shape.
The logic follows that on the proportion scale, a type-II response will show an increasing (i.e. positive and statistically different from zero) initial slope with respect to density whereas a type-III response will show a negative slope, followed by a positive higher order slope.
The test proceeds by fitting two models:
glm(cbind(eaten,noteaten)~density, family='binomial')
glm(cbind(eaten,noteaten)~density+density^2, family='binomial')
where eaten
is the left hand side of the formula
input, density
is the right hand side and noteaten
is the difference between the two. The output from these models to determine which functional response is preferred using the logic above.
Currently no consideration is given to a type-I (i.e. linear) response or any other potentially sensible fit other than a type-II or type-III response. It is up to the user to decide if it is appropriate to continue with fitting a mechanistic model of the functional response (i.e. frair_fit
, frair_compare
and/or frair_boot
) on the back of the results of this test.
Juliano SA (2001) Nonlinear curve fitting: Predation and functional response curves. In: Scheiner SM, Gurevitch J (eds). Design and analysis of ecological experiments. Oxford University Press, Oxford, United Kingdom. pp 178--196.
frair_fit
data(gammarus)
frair_test(eaten~density, data=gammarus)
dat <- data.frame(x=1:100, y=floor(hassIII(1:100,b=0.01,c=0.001,h=0.03,T=1)))
frair_test(y~x, data=dat)
Run the code above in your browser using DataLab