Description Usage Arguments Details Value Author(s) References See Also Examples
Implements the phenomenological test of type-II versus type-III functional responses described by Juliano (2001)
1 2 3 | frair_test(formula, data)
## S3 method for class 'frtest'
print(x, ...)
|
formula |
A simple formula of the form |
data |
The dataframe containing |
x |
Output from |
... |
Other items passed to the print method. |
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.
frair_test
returns a list of class frtest
with the following items:
call |
The original call to |
x |
The original x data supplied to |
y |
The proportion of prey eaten: y/x |
xvar |
A string. The right hand side of |
yvar |
A string. Always |
modT2 |
The output from the type-II glm |
modT3 |
The output form the type-III glm |
Daniel Pritchard
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.
1 2 3 4 5 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.