frair_test(formula, data)
"print"(x, ...)
y ~ x
.x
and y
.frair_test
.frair_test
returns a list of class frtest
with the following items:
frair_test
.frair_test
.formula
.'Proportion'
.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_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