Volume 9, Issue 10 p. 2076-2090
RESEARCH ARTICLE
Open Access

Fitting functional responses: Direct parameter estimation by simulating differential equations

Benjamin Rosenbaum

Corresponding Author

Benjamin Rosenbaum

German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig, Leipzig, Germany

Institute of Biodiversity, Friedrich Schiller University Jena, Jena, Germany

Correspondence
Benjamin Rosenbaum and Björn C. Rall, German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig, 04103 Leipzig, Germany.
Emails: [email protected]; [email protected]Search for more papers by this author
Björn C. Rall

Corresponding Author

Björn C. Rall

German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig, Leipzig, Germany

Institute of Biodiversity, Friedrich Schiller University Jena, Jena, Germany

Department of Aquatic Ecology, Netherlands Institute of Ecology (NIOO-KNAW), Wageningen, The Netherlands

Department of Terrestrial Ecology, Netherlands Institute of Ecology (NIOO-KNAW), Wageningen, The Netherlands

Correspondence
Benjamin Rosenbaum and Björn C. Rall, German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig, 04103 Leipzig, Germany.
Emails: [email protected]; [email protected]Search for more papers by this author
First published: 19 June 2018
Citations: 57

Abstract

  1. The feeding functional response is one of the most widespread mathematical frameworks in ecology, marine biology, freshwater biology, microbiology, and related scientific fields describing the resource-dependent uptake of a consumer. Since the exact knowledge of its parameters is crucial to predict, for example, the efficiency of biocontrol agents, population dynamics, food web structure, and subsequently biodiversity, a trustworthy parameter estimation method is highly important for scientists using this framework. Classical approaches for estimating functional response parameters lack flexibility and often only provide approximations of the correct parameters.
  2. Here, we combined ordinary differential equation (ODE) models that were numerically solved using computer simulations with an iterative maximum likelihood fitting approach. We compared our method to classical approaches of fitting functional responses using data both with and without additional resource growth and mortality.
  3. We found that for classical functional response models, such as the frequently used type II and type III functional responses, the established fitting methods are reliable. However, by using more complex and flexible functional responses, our new method outperforms the traditional methods. Additionally, our method allows the incorporation of side effects such as resource growth and background mortality.
  4. Our method will enable researchers from different scientific fields who are measuring functional responses to calculate more accurate parameter estimates. These estimates will enable community ecologists to parameterize their models more precisely, thus allowing a deeper understanding of complex ecological systems, and will increase the quality of ecological prediction models.

1 INTRODUCTION

Understanding the interactions between organisms is crucial to understand the patterns of stability and biodiversity of whole communities (McCann, 2000). Theory suggests that antagonistic interactions, such as feeding interactions, may have negative effects on stability (May, 1972) and, subsequently, on biodiversity (e.g., Rall, Guill, & Brose, 2008). Moreover, a good knowledge of interactions may allow ecologists to create realistic predictions of empirical communities ranging from microcosms to whole lakes (Boit, Martinez, Williams, & Gaedke, 2012; Fussmann, Schwarzmuller, Brose, Jousset, & Rall, 2014; Schneider, Scheu, & Brose, 2012). It is therefore of utmost importance to have reliable methods for quantifying the strength of interactions amongst organisms, especially consumer-resource pairs such as predators and their prey.

1.1 Functional response models

The functional response (Holling, 1959b; Solomon, 1949) is one of the oldest and most commonly used mathematical frameworks to describe and estimate the feeding interaction between a consumer and a resource (see Jeschke, Kopp, & Tollrian, 2002 for an overview). It describes the density-dependent feeding rate of a consumer on its resource (Holling, 1959b). Despite the plethora of possibilities, the most important models used today are the type II and type III functional responses (Jeschke, Kopp, & Tollrian, 2004; Skalski & Gilliam, 2001). The type II response is a hyperbolic saturating curve (Figure 1, blue line), where the per capita feeding rate F depends on the number of prey in the environment N:
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0001(1)
Details are in the caption following the image
Top: Feeding rate F(N) for three different functional response models: Holling's type II (a), Holling's type III (b), and the generalized response (c). Bottom: Predicted number of prey present N(t) = N0 − Ne(t) over time t for the type II (d), type III (e), and a generalized (q = 0.5) functional response (f) while ignoring prey depletion (dotted), using the RRPE (dashed) and our new numerical solution of the ODE (solid)

Here, a is the instantaneous rate of discovery (Holling, 1959b) that is commonly known and subsequently used here as the attack rate (note that depending on the scientific field, it may be known as capture rate (e.g., Kalinkat, Rall, Vucic-Pestic, & Brose, 2011), maximum clearance rate (e.g., Hansen, Bjornsen, & Hansen, 1997), maximum per capita interaction strength (e.g., McCann, Hastings, & Huxel, 1998), or others); and h is handling time (Holling, 1959a). See Jeschke et al. (2002, 2004) for a comprehensive introduction and discussion of the ecological meaning of these parameters. The attack rate a mainly controls the initial increase of feeding at low densities (Figure 1a, grey dashed line), whereas the handling time h mainly controls the feeding at high densities, where the feeding curve is saturated (Figure 1a, grey dotted line). The inverse of the handling time is often referred to as the maximum feeding rate Fmax, but it is also called the maximum ingestion rate (e.g., Hansen et al., 1997), the handling rate (e.g., Englund, Öhlund, Hein, & Diehl, 2011), or similar terms.

If the attack rate is not a constant but instead depends linearly on resource density (a = bN), the functional response becomes a sigmoid curve (e.g., Juliano, 2001, see Figure 1b, red line) that can be described by
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0002(2)
where b is the attack coefficient. Similar to the type II functional response, the attack rate a controls the feeding rate at low prey densities (Figure 1b, grey dashed line), and the handling time h controls the feeding rate at high prey densities (Figure 1b, grey dotted line). See, for example, Juliano (2001) for more possibilities to model a type III functional response and Okuyama (2010) for resource density-dependent handling times.
Real (1977, 1979) incorporated the possibility to gradually shift between the above types of functional responses by using the enzyme kinetics model of Barcroft and Hill (1910). In Real's adaptation, the attack rate depends on a power law of resource density (a = bNq), leading to a functional response model that can be written as
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0003(3)
where q is an exponent that influences the shape of the functional response from a hyperbolic type II functional response (q = 0) to a strict type III functional response (q = 1) and beyond these bounds (Figure 1c). Note that the original formulation of this functional response is urn:x-wiley:2041210X:media:mee313039:mee313039-math-0004, where Fmax is the already mentioned maximum feeding rate (h = 1/Fmax) and Nhalf is the half saturation density—the prey density at which the predator consumes half the amount of its maximum possible feeding rate (urn:x-wiley:2041210X:media:mee313039:mee313039-math-0005; Figure 1c, grey dotted-dashed line, please see the Supporting Information 1 (Section 1) for the equivalence of both parametrizations and Real (1977)). Moreover, the attack exponent q is often not used directly but in its transferable version, the Hill exponent H (H = q + 1). This kind of functional response is also often called the generalized functional response (e.g., Barrios-O’Neill et al., 2016; Kalinkat et al., 2013).

Using this elegant generalized functional response model revealed that increasing the attack exponent q only slightly introduces the stability of simple consumer-resource population models up to whole food webs and thereby increases biodiversity (Rall et al., 2008; Uszko, Diehl, Pitsch, Lengfellner, & Müller, 2015; Williams & Martinez, 2004). Inspired by these theoretical findings, researchers aimed to investigate which traits (e.g., body mass; Barrios-O’Neill et al., 2016; Kalinkat et al., 2013; Vucic-Pestic, Rall, Kalinkat, & Brose, 2010), environmental drivers (e.g., temperature (Uszko, Diehl, Englund, & Amarasekare, 2017b) or habitat structure (Barrios-O’Neill et al., 2016; Li, Brose, Meyer, & Rall, 2017)) change the attack exponent q from zero (a destabilizing type II functional response) to higher values (a stabilizing generalized functional response).

1.2 The problem of prey depletion—and its possible solutions

The above-mentioned functional response models (Equations 1-3) describe how the feeding rates depend on the number of prey in the environment (Figure 1a–c). This means that the independent variable (displayed on the x-axis) must be a constant prey density. In experiments, however, it is difficult to keep the prey density constant over time. Most feeding trials aiming to estimate a functional response are designed as follows: (1) a selected number of resource items is introduced into an experimental arena; (2) one or more consumers are added; (3) the experiment is run over a defined time range; (4) the remaining prey items are counted; and (5) the number of prey remaining is subtracted from the initial number of prey, yielding the number of prey consumed over time. This has two implications: (1) the measured variable is not a rate but the cumulative number of eaten prey items; and (2) the independent variable—the prey density—decreases over time. This phenomenon is commonly known as prey depletion (Rogers, 1972).

Describing the change in population density over time is classically done by using ordinary differential equations (ODEs); this approach is applied to model a wide range of ecological systems, from single populations to multitrophic communities (e.g., Delmas, Brose, Gravel, Stouffer, & Poisot, 2017; Rall et al., 2008; Rosenzweig & Mac Arthur, 1963; Verhulst, 1838). To correctly describe prey depletion during the course of a functional response experiment, we can set up an equation using the generalized Holling functional response (Equation 3):
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0006(4)

This equation describes the change in prey density dN over time dt, which is proportional to the feeding rate, that is, the generalized functional response (Equation 3), multiplied by predator density P. ODE models must be integrated over time and density to yield the density at a desired point in time—here, the prey density at the end of the experiment Nend (Figure 1d–f, black solid lines). This integration process can be done analytically (i.e., using mathematical rules to derive a new function N(t) having time as an independent variable and density as a dependent variable); alternatively, if the ODE is too complex to solve analytically, it can be solved numerically by using computer algorithms that approximate the analytical solution with a high accuracy. After integration, the number of prey eaten over time Ne is calculated by simply subtracting the remaining prey density at the end of the simulation (as for experimental data) Nend from the starting density N0 (Ne = N0 − Nend). As mentioned above, this generalized Equation 4 becomes a type II functional response if the attack exponent is zero (q = 0, Figure 1d) or a type III functional response if the attack exponent becomes unity (q = 1, Figure 1e). In the following sections, we give an overview of the existing methods that use the functional response to predict the number of consumed prey Ne.

The simplest approximation that could be made to describe the depletion of prey over the course of the experiment is to replace N by the known number of initial prey N0 in the feeding rate F(N) and to multiply this feeding rate F(N0) by the number of predators P (more generally, consumers) and the duration of the experiment T, yielding the number of prey eaten at the end of the experiment Ne:
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0007(5)

Here, any of the above-mentioned functional response models (Equations 1-3) can be used for the feeding rate F. This method is a linearization of the nonlinear process that is precisely described by the ODE (Equation 4) and yields a linear decrease of live prey in the experiment over time (Figure 1d–f, dotted lines).

Instead of linearizing the ODE (Equation 4), Royama (1971) and Rogers (1972) presented an analytical solution of the ODE incorporating a type II functional response (q = 0), commonly known as Rogers’ Random Predator Equation (for the analytical derivation see Supporting Information 1 Section 2):
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0008(6)

Here, the number of prey consumed at the end of the experiment Ne depends on the regular functional response parameters of attack rate a and handling time h and on the total duration of the experiment T and the number of predators P. This equation is commonly used to estimate parameter values for a type II functional response when prey depletion occurs, and we refer to it as Rogers’ Random Predator Equation II (RRPE-II).

With the unknown number eaten Ne appearing on both sides of this implicit equation (RRPE-II), the problem arises that a simple nonlinear fitting algorithm is not applicable. The most frequently used solution to this problem is to use an iterative Newton's method (Juliano, 2001; Juliano & Williams, 1987). However, the state-of-the-art solution is to instead use the LambertW function, which allows an explicit solution of the implicit RRPE-II (Bolker, 2008):
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0009(7)
see also Figure 1d, dashed line. This approach has already been incorporated into a r-package for easy application (Pritchard, 2016; Pritchard, Paterson, Bovy, & Barrios-O’Neill, 2017).
Juliano (2001) suggested that for fitting type III functional responses with prey depletion, it is possible to simply include the resource density dependency of the attack rate and replace the time-dependent prey number N with the constant value of the prey number at the start of the experiment N0 (a = bN ≈ bN0) in the RRPE-II, yielding
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0010(8)
where the parameters are as described above: the number eaten Ne, attack constant b, handling time h, total time T, and number of predators P. We hereafter refer to this approach as Rogers’ Random Predator Equation III (RRPE-III).
Similar to the RRPE-II, this implicit equation can be solved iteratively by Newton's method for Ne or by using the LambertW function:
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0011(9)

Regardless of whether this equation is solved implicitly or explicitly, due to the approximation a = bN ≈ bN0, the predicted number of eaten prey Ne is an approximation of the type III ODE and is not analytically correct (Figure 1e, dashed line).

As an alternative to the type III functional response, Hassell, Lawton, and Beddington (1977) presented a sigmoid-shaped feeding curve that accounts for prey depletion. Since the classical type III response is a special case of their wider class of curves (see Supporting Information 1 Section 3; Okuyama & Ruyle, 2011), a simplified version of their original equation describing how prey will be depleted over time following a type III functional response can be derived:
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0012(10)

This equation represents an analytically correct solution of an ODE with a type III functional response (for the derivation see Supporting Information 1 Section 3). This function is more complex than the RRPE-III, but it contains exactly the same parameters: the number eaten Ne, attack constant b, handling time h, total time T, and number of predators P. It has the advantage that the dependent variable Ne is only on the left side of the equation, which allows standard fitting algorithms to be used.

While the above models can be used to fit either type II or type III functional responses, the following equation can also be used to fit the generalized functional response (Equation 3) to data with prey depletion. The power law dependency of the attack rate urn:x-wiley:2041210X:media:mee313039:mee313039-math-0013 was incorporated into the RRPE-II (e.g., Barrios-O’Neill et al., 2016; Kalinkat et al., 2013; Vucic-Pestic et al., 2010), yielding
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0014(11)
where the parameters are as above: the number eaten Ne, attack constant b, attack exponent q, handling time h, total time T and number of predators P. We hereafter refer to this approach as the generalized Rogers’ Random Predator Equation (RRPE-gen).
Again, this implicit problem can be solved iteratively by Newton's method or by explicitly using the LambertW function
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0015(12)
Analogous to the RRPE-III, these solutions of the RRPE-gen are an approximation of the ODE with a generalized FR (Figure 1f, dashed line). For the special case of q = 0.5, an analytical and explicit solution for the number of prey eaten can be found in Okuyama and Ruyle (2011).
As an alternative, Uszko et al. (2015, 2017b) generalized a method developed by Frost (1972), in which (1) an approximation of the average resource density urn:x-wiley:2041210X:media:mee313039:mee313039-math-0016 is calculated (urn:x-wiley:2041210X:media:mee313039:mee313039-math-0017)—taking prey depletion into account—and (2) the functional response parameters are estimated using (for further information see Supporting Information 1 Section 4):
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0018(13)

1.3 Possible drawbacks of the different methods

Using the simplest approach, where the feeding rate is multiplied by the predator density and duration of the experiment (Equation 5), prey depletion during the experiment is neglected. Because this feeding rate is higher than the actual feeding rate, which is based on a reduced number of prey later in the experiment (N0 > N causes F(N0) > F(N), cf. Figure 1d–f, compare the dotted lines to the solid line created by the ODE representing the natural depletion of prey), the attack rate a will be underestimated, regardless of whether a type II, type III, or generalized functional response is used. If the feeding realized over the course of an experiment (i.e., the total number of consumed prey) approaches a saturation level, the estimate of the maximum feeding rate Fmax (or handling time urn:x-wiley:2041210X:media:mee313039:mee313039-math-0019) should only be marginally affected.

The RRPE-II is the exact analytical solution of an ODE that describes the depletion of prey over time with a type II functional response. The resulting depletion of prey over time is consequently identical when using the RRPE-II or the numerical simulation of an ODE (Figure 1d, dashed vs. solid line). This method therefore delivers reliable parameter estimates if the data can be described by a type II functional response.

As the RRPE-II is the exact solution for an ODE with a type II functional response, there can be negative consequences when it is used to fit nontype II functional responses, such as the type III and generalized functional responses. The attack rate a = bNq is, in this case, itself dependent on the prey number. Approximating N by using a larger N0 creates a larger attack rate and, therefore, a greater decrease in prey than given in a simulated ODE (Figure 1e–f, dashed vs. solid line). A greater decrease in prey should lead to an underestimation of attack rates (i.e., attack coefficient b), but the handling time should not be affected if the number of consumed prey in the experiment reaches a saturation level. An increasing attack exponent q decreases the number of prey consumed at low prey numbers, as prey depletion is overpredicted by using Rogers’ Random Predator equation with a type III or generalized functional response. We assume that the attack exponent q is overestimated to counteract this effect.

We were not able to create strong expectations for the method by Frost (1972) and Uszko et al. (2015) since this two-step process cannot be visualized as descriptively as the previous methods. However, as the original method is based on a type I functional response, we also assume deviations from the correct solution in all cases.

1.4 The problem of nonconsumer-mediated prey growth and mortality

Another problem that often arises in experiments is that background mortality or growth of the prey could occur. For example, the assumption of constant prey numbers in the experiment could be violated not only because of prey removal by predators but also because of prey mortality or population growth, which is often the case if using microbial or algal prey (e.g., Fussmann, Rosenbaum, Brose, & Rall, 2017; Uszko et al., 2017b). Standard ways to deal with this are to exclude any data that are biased by mortality or growth, leading to a substantial loss of data, or to ignore the problem if it is not too pronounced, accepting that the resulting bias in the parameters is likely to be small (e.g., Uszko et al., 2017b; Vucic-Pestic et al., 2010). However, it is also possible to minimize bias without excluding data by fitting the parameters using simulations of ODEs (see, for example, Rall & Latz, 2016). Additional mortality can be accounted for by adding a mortality rate, m, to the ODE (Equation 4). This is a standard way to model mortality in population and food web modelling (e.g., Fussmann et al., 2014; Kalinkat et al., 2013; Rall et al., 2008; Rosenzweig & Mac Arthur, 1963; Williams & Martinez, 2004)
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0020(14)
for arbitrary functional response models F(N).
The growth of prey is often described by simple phenomenological growth models, such as logistic growth (Verhulst, 1838) and the Gompertz growth model (Gompertz, 1825; Paine et al., 2012). The logistic growth can be added to the ODE model by simply adding the growth term as the mortality above. For the logistic growth, the ODE becomes
urn:x-wiley:2041210X:media:mee313039:mee313039-math-0021(15)
where K is the carrying capacity, that is, the number of prey a system can sustain, and r is the intrinsic growth rate that controls prey growth at low prey densities and determines prey mortality if the prey density is above the carrying capacity. The rest of the parameters are as above in the case of a simple functional response ODE.

In cases of both prey mortality and combined prey growth and mortality, we expect biased functional response parameters if the estimation is not corrected for these additional effects. In experiments where prey mortality occurs (Equation 14), this could lead to an overestimation of the attack rate or attack coefficient, an underestimation of the attack exponent (the lower the exponent is, the higher the feeding at low prey numbers is), and an underestimation of handling time (the lower handling time is, the higher the maximum consumed number of prey is) to counteract the additional effect of mortality. If the prey is growing and dying according to the above-mentioned growth model (Equation 15), there would likely be an underestimation of the attack rate (which describes feeding at low prey numbers) or attack coefficient and, potentially, an overestimation of the attack exponent to counteract the additional growth of prey at low numbers. At high prey numbers exceeding the carrying capacity, background prey mortality occurs, and there would likely be an underestimation of the handling time (which describes feeding at high prey numbers) to counteract this effect. Using extended ODE models and fitting them numerically to the data should overcome the problem. We further expect that using additional control data (no predators present) will improve the accuracy of the parameter estimation because the effects of natural growth (or death) and predation can be disentangled.

Here, we present a new framework for fitting functional response models to data. We combine numerical simulations of ODE models with an iterative maximum likelihood estimator using r (Rall & Latz, 2016, but see DeLong, Hanley, & Vasseur, 2014 for alternatives). This allows us to fit any functional response model to data more flexibly and precisely than when using traditional methods. Our approach produces similar results for the special case of a strict type II functional response being used to solve the RRPE-II with either Newton's method or the LambertW function. Additionally, we expect that in the special case of a strict type III functional response, the parameter estimation by the analytical solution (Equation 10) and numerical simulation methods should deliver similar results. In the case of the generalized functional response, which is widely used in current ecological studies (Barrios-O’Neill et al., 2016; Kalinkat et al., 2013; Li et al., 2017; Pawar, Dell, & Savage, 2012; Uszko et al., 2015; Vucic-Pestic et al., 2010), we expect that our method will outperform traditional methods. Moreover, fitting numerical simulations of ODE models allows us to cope with side effects such as prey growth and mortality that may otherwise bias or even prevent the estimation of functional response parameters.

2 MATERIALS AND METHODS

We simulated 1,000 datasets based on ODE models (Equation 4) for each of the type II, type III, and generalized functional responses. For numerical simulations, we used the deSolve package (Soetaert, Petzoldt, & Setzer, 2010). We drew attack coefficients, handling times and, in the generalized case, attack coefficients from random distributions (see Supporting Information 1 Section 5). Each dataset contained a total of 960 observations of eaten prey Ne from the initial prey numbers N0, ranging from 1 to 48 individuals. We further simulated 1,000 datasets for the generalized functional response, including prey mortality (Equation 14), and 1,000 datasets for the generalized functional response, including prey growth (and natural prey death, if the prey number exceeded the carrying capacity, Equation 15). Again, see Supporting Information 1 Section 5 for details on data simulation.

We used an iterative maximum likelihood method (bbmle package, function mle2(); Bolker, 2008; Bolker & R Development Core Team, 2016) to fit models to simulated data as well as experimental datasets (see below). Unless stated otherwise, we assumed binomially distributed numbers of consumed prey. This means that for each observation urn:x-wiley:2041210X:media:mee313039:mee313039-math-0022 (i = 1, …, n), a prediction for the number of eaten prey urn:x-wiley:2041210X:media:mee313039:mee313039-math-0023 was calculated based on the respective model and its parameters. The observation urn:x-wiley:2041210X:media:mee313039:mee313039-math-0024 was then modelled as being binomially distributed with urn:x-wiley:2041210X:media:mee313039:mee313039-math-0025 trials and a success probability of urn:x-wiley:2041210X:media:mee313039:mee313039-math-0026 to compute the likelihood. See Supporting Information 2 Section 7 for more information on the construction of likelihood functions and fitting routines.

The growth model requires a different statistical approach. Through growth, the number of prey present at the end of the experiment Nend can exceed the number of initial prey N0. Negative numbers of eaten or dead prey Ne = N0 − Nend occur and make the binomial distribution unsuitable for this model. Instead, we use Nend, which is always nonnegative. For each observation urn:x-wiley:2041210X:media:mee313039:mee313039-math-0027 (i = 1, …, n), the prediction of the number of prey present urn:x-wiley:2041210X:media:mee313039:mee313039-math-0028 at the end of the experiment was calculated by a numerical simulation of the ODE. The observation urn:x-wiley:2041210X:media:mee313039:mee313039-math-0029 was modelled as being log-normally distributed with a location parameter urn:x-wiley:2041210X:media:mee313039:mee313039-math-0030 and scale parameter σ. This scale parameter is also automatically estimated in the iterative maximum likelihood routine (Crawley, 2012, chap. 7.3.3). The log-normal distribution considers that residuals generally have a larger variance for large prey abundances. We also chose it because microbial systems, where prey are measured as density, usually feature prey growth; however, for pure count data, a negative binomial or Poisson distribution can be used. See Supporting Information 2 Section 7.6 for a detailed description of this likelihood function.

For data without prey growth or mortality, we fitted all corresponding feeding models and compared the original simulation parameters to the estimates. For simulated data including background prey mortality, we tested the performance of fitting the ODE model neglecting mortality (Equation 4) and the ODE model including mortality (Equation 14). We also used the mortality model to fit simulated data, which used half of the 960 observations as control data; that is, no predators are present, and prey death occurs by natural mortality only. For data including prey growth and mortality, we also tested the performance of fitting the ODE model neglecting growth (Equation 4) and the ODE model including growth (Equation 15). We furthermore used the growth model to fit simulated data, which used half of the 960 observations as control data; that is, no death by predation occurs. We evaluated the performance of all models by comparing the  log 10-ratios of estimated and true parameters (Berlow, Navarrete, Briggs, Power, & Menge, 1999; Rall & Latz, 2016).

We fitted our new ODE-based models (Equation 4) to six experimental datasets from the literature and compared the results to the studies’ original methods, which are as follows. Sentis, Morisson, and Boukal (2015) used the RRPE-III to fit dataset D1, and the RRPE-gen was fitted to dataset D2 in Vucic-Pestic et al. (2010). Uszko, Diehl, Englund, and Amarasekare (2017a) and Uszko et al. (2017b) used Frost's method with a generalized FR for dataset D3. Note that this dataset consists of prey densities instead of prey individuals, which requires a log-normal distribution (for details, see Supporting Information 2 Section 7.5). Barrios-O’Neill, Dick, Emmerson, Ricciardi, and MacIsaac (2014a,b) fitted the RRPE-gen to experimental data featuring a low (D4), medium (D5), or high (D6) spatial refuge for prey, which result in lower, medium, and higher attack exponents.

The additional dataset D7 (L. Archer, personal communication, 2017) includes natural prey mortality and contains control data without any predators present. As done for the simulated data (see above), we compared the performance of the generalized ODE neglecting mortality (Equation 4) to the models including mortality (Equation 14) with and without using control data.

In a last example, we used the dataset D8 (Fussmann, 2017), which features natural prey growth and death. The example also includes control data without predators present. Similar to the simulated data, we fitted the generalized ODE neglecting growth (Equation 4) and the model including a growth term (Equation 15) with and without using control data.

3 RESULTS

3.1 Feeding models

The results of fitting type II, type III, and generalized functional response feeding models to the simulated data are depicted in Figure 2. For data simulated with a type II response, our new ODE model (Equation 4) and the old models RRPE-II-LambertW (Equation 7) and RRPE-II-Newton (Equation 6) represent analytically correct feeding models. They provide an unbiased estimation of the attack rates and handling times; that is, the mean error over 1,000 fits equals zero. Fitting the functional response term directly to the data (Equation 5) leads to a heavily biased estimation because the method does not correct for depleted prey. As expected, the attack rates are systematically underestimated, as are the handling times. When using Frost's method for correction (Equation 13), these errors are reduced, but the estimates are still biased.

Details are in the caption following the image
Evaluation of feeding models for the type II, type III, and generalized functional responses. Plots show the error distributions of fitted parameters urn:x-wiley:2041210X:media:mee313039:mee313039-math-0031 in 1,000 simulated datasets. Green and yellow indicate analytically correct feeding models, and orange indicates approximations

In the case of a type III response, our new ODE model (Equation 4) and the model based on Hassell's method (Equation 10) provide analytically correct solutions for the number of eaten prey. Both return unbiased estimates for the attack rates and handling times. For the methods RRPE-III-LambertW (Equation 9) and RRPE-III-Newton (Equation 8), the approximation of a = bN by bN0 causes a severe underestimation of attack coefficients. Additionally, the handling time estimates are biased. Again, a direct fit of the functional response to the data (Equation 5) leads to a severe underestimation of attack coefficients and to biased handling times. While Frost's correction for depleted prey (Equation 13) features an overall unbiased estimation of attack coefficients, the spread of errors is comparably large, and the handling time estimates are still biased.

For a generalized model with a flexible attack exponent, our new ODE model (Equation 4) is the only correct feeding model for our simulated data. Therefore, it is the only method that provides a jointly unbiased estimation of attack coefficients, handling times and attack exponents. As above, the methods RRPE-gen-LambertW (Equation 12) and RRPE-gen-Newton (Equation 11) underestimate the attack coefficients due to the approximation of a = bNq by urn:x-wiley:2041210X:media:mee313039:mee313039-math-0032. The deviation from all three true parameters is even stronger when directly fitting the functional response (Equation 5), and Frost's correction for prey depletion (Equation 13) produces overall biased estimates.

3.2 Prey mortality and prey growth

We compared three new ODE approaches of dealing with natural prey mortality (Figure 3). When fitting a mortality-free model (Equation 4) to data that include natural mortality, the attack coefficients and maximum feeding urn:x-wiley:2041210X:media:mee313039:mee313039-math-0033 are systematically overestimated to compensate for the missing mortality term. The estimates of the attack exponents are also biased, as expected. Using a model including mortality (Equation 14) leads to an unbiased prediction of all parameters. However, the error ranges for handling time h and the mortality coefficient m are still relatively large because the effects of predation and natural mortality are correlated. However, if control data are used, the accuracy of the predicted h and m is considerably improved because predation and mortality effects can be disentangled.

Details are in the caption following the image
Evaluation of the ODE model with an additional prey mortality term. Plots show the error distributions of fitted parameters urn:x-wiley:2041210X:media:mee313039:mee313039-math-0034 in 1,000 simulated datasets

Similarly, we compared three new ODE approaches of fitting data including natural prey growth and death (Figure 4). Neglecting growth in the model (Equation 4), the handling times h are unexpectedly unbiased but feature a comparatively large error range. The attack exponents q are also unexpectedly slightly underestimated. In combination with the severely underestimated attack coefficients b, we anticipate that the attack rates a = bNq are generally underestimated because they must correct for the missing growth term in the model. When including this term (Equation 15), all functional response parameters, as well as the growth term's parameters, growth rate r and carrying capacity K, are unbiased. By fitting this growth model to data and using half of the number of observations as control data, the accuracy of unbiased estimates is drastically improved.

Details are in the caption following the image
Evaluation of the ODE model with an additional prey growth and mortality term. Plots show the error distributions of fitted parameters urn:x-wiley:2041210X:media:mee313039:mee313039-math-0035 in 1,000 simulated datasets

3.3 Experimental data

When fitting our new ODE model (Equation 4) to experimental datasets, the predicted curves of eaten prey were almost identical to the studies’ original methods (Figure 5). Both methods performed similarly in fitting observed data. However, our focus lies on the parameters that produce these curves and on their discrepancies. Therefore, we do not provide model comparisons (e.g., AIC scores) but report these differences in the estimates (Table 1) and contrast them to our results obtained from the simulated data.

Details are in the caption following the image
Fits of the original and our new ODE-based parameter estimation method to six experimental datasets D1–D6
Table 1. Functional response parameters for experimental data (D1–D6). n = number of observations, b = attack coefficient, h = handling time, q = attack exponent. Standard errors are shown in parentheses. p-values: · p < 0.1, *p < 0.05, **p < 0.01, ***p < 0.001. Units are: †b[arena2 day−1 #N−1 #P−1], h[day #N−1 #P]; ‡b[arena1+q day−1 #Nq #P−1], h[day #N−1 #P]; §urn:x-wiley:2041210X:media:mee313039:mee313039-math-0036, urn:x-wiley:2041210X:media:mee313039:mee313039-math-0037
dataset Method n b h q
D1 (Sentis et al., 2015) New ODE III 70 0.083*** 0.008***
(±0.009) (±0.000)
Old RRPE III 70 0.069*** 0.008***
(±0.007) (±0.000)
D2 (Vucic-Pestic et al., 2010) New ODE gen 54 0.112* 0.040*** 0.597**
(±0.056) (±0.004) (±0.197)
Old RRPE gen 54 0.108* 0.039*** 0.565**
(±0.052) (±0.003) (±0.176)
D3 (Uszko et al., 2017a,b New ODE gen 30 0.295** 10.807*** 0.247*
(±0.095) (±1.832) (±0.102)
Old Frost gen 30 0.274*** 10.426*** 0.223*
(±0.082) (±1.897) (±0.095)
D4 (Barrios-O’Neill et al., 2014a,b) New ODE gen 44 2.688*** 0.050 −0.312
(±0.350) (±0.032) (±0.236)
Old RRPE gen 44 4.060 · 0.051 −0.410
(±2.251) (±0.046) (±0.467)
D5 (Barrios-O’Neill et al., 2014a,b) New ODE gen 27 0.325 0.066* 0.425
(±0.230) (±0.027) (±0.461)
Old RRPE gen 27 0.306 0.064* 0.392
(±0.227) (±0.026) (±0.415)
D6 (Barrios-O’Neill et al., 2014a,b) New ODE gen 44 0.019 0.172*** 2.298*
(±0.027) (±0.021) (±0.961)
Old RRPE gen 44 0.021 0.169*** 1.937**
(±0.024) (±0.021) (±0.669)

The handling time h estimates are generally similar when comparing the original and our new ODE method for all datasets. When considering a type III (dataset D1) or generalized response (datasets D2, D3) with similarly fitted attack exponents q, the attack coefficients b are underestimated by the RRPE and by Frost's method compared to the new ODE approach. This confirms our findings of the comparisons using simulated data and our assumptions about biased attack rates of the RRPE. By ignoring prey depletion and approximating a = bN by bN0 (or a = bNq by urn:x-wiley:2041210X:media:mee313039:mee313039-math-0038 in the generalized case), N0 > N causes an underestimation of the attack coefficients b. In datasets D4–D6, we observed both an under- and overestimation of attack coefficients b by the RRPE-gen. The attack exponents are also underestimated. We emphasize that for generalized functional responses, attack coefficients and attack exponents in a = bNq can only be interpreted jointly. For an alternative parametrization using the half saturation density to describe feeding at low densities independently from q, see the Supporting Information 1 Section 1 and Real (1977).

For the dataset D7 featuring natural prey mortality, we compared our generalized ODE model neglecting mortality (Equation 4) to the ODE model including a mortality rate (Equation 14) with and without using control data (Figure 6, Table 2, see also Supporting Information 2 Section 3). Again, the different models produce similar curves when fitting data with predators present, but the parameter estimates are quite different. As expected, the maximum feeding rate urn:x-wiley:2041210X:media:mee313039:mee313039-math-0039 compensates for natural prey death and is therefore highly overestimated when fitting a model without a mortality term; that is, the handling time h is underestimated. When fitting the mortality model without using control data, a negative mortality rate m is predicted, which actually indicates natural prey growth instead of prey mortality. However, the estimate is not significant and features a high standard deviation because the effects of feeding and natural prey mortality (or growth) cannot be disentangled. Using the same mortality model and including additional control data, a positive mortality rate m is estimated, and we observe a reduced uncertainty (smaller standard error) in the estimates for m. Control data enable the precise separation of feeding and natural death.

Details are in the caption following the image
Fits of our new ODE-based models to experimental datasets D7, including background prey mortality (top), and D8 including background prey growth and mortality (bottom); feeding experiments (left) and control experiments (right)
Table 2. Functional response parameters for experimental data (D7, L. Archer, personal communication, 2017). n = number of observations, b = attack coefficient, h = handling time, q = attack exponent, m = mortality rate. Standard errors are shown in parentheses. p-values: · p < 0.1, *p < 0.05, **p < 0.01, ***p < 0.001. Units are: b[arena1+qday−1 #Nq #P−1], h[day #N−1 #P], m[#N arena−1 day−1]
Method n b h q m
D7 ODE 13 2.415*** 0.018 −0.060
(±0.699) (±0.014) (±0.272)
ODE + mort 13 3.329* 0.005 −0.062 −0.995
(±1.643) (±0.008) (±0.173) (±1.648)
ODE + mort + control 31 2.207** 0.031 −0.049 0.279***
(±0.748) (±0.022) (±0.354) (±0.043)

Dataset D8 includes natural prey growth and death, and we compared our generalized ODE model ignoring background growth (Equation 4) to the ODE model including a logistic growth term (Equation 15) with and without using control data (Figure 6, Table 3). Note that the parameters r, K, b and h are estimated on their log scale. If the parameters differ by several orders of magnitude, this can improve the efficiency of the iterative maximum likelihood algorithm; see Supporting Information 2 Sections 5 and 7.6 for details. Surprisingly, the parameter estimates for fitting the model neglecting growth and the full model including control data are similar, although their predictions do differ for large initial prey densities. Fitting the growth model without control data produces heavily biased estimates. A large carrying capacity K and a large growth rate r lead to a decrease in the predicted dead prey for large initial prey densities. Using control data, the uncertainty in all parameters is significantly reduced (smaller standard errors) because the effects of feeding and natural growth (N < K) (or natural loss, N > K) can be separated precisely.

Table 3. Functional response parameters for experimental data (D8, Fussmann, 2017). n = number of observations, b = attack coefficient, h = handling time, q = attack exponent, r = growth rate, K = carrying capacity. Standard errors are shown in parentheses. p-values: · p < 0.1, *p < 0.05, **p < 0.01, ***p < 0.001. Units are: b[μl1+q min−1 #Nq #P−1], h[min #N−1 #P], r[#N μl−1min−1], K[#N μl−1]
Method n  log (b)  log (h) q  log (r)  log (K)
D8 ODE 53 −19.356*** −1.250*** 0.751**
(±2.954) (±0.146) (±0.267)
ODE + growth 53 −16.387*** −1.768*** 0.499 · −7.238*** 16.934
(±3.217) (±0.535) (±0.283) (±0.485) NA
ODE + growth + control 179 −19.401*** −1.257*** 0.763*** −8.580*** 13.115***
(±2.181) (±0.111) (±0.198) (±0.376) (±0.346)

4 DISCUSSION

We compared different popular methods and our new ODE-based approach for fitting functional response models to feeding experiments using both simulated and experimental datasets. We estimated the parameters of the type II, type III, and generalized functional response models via maximum likelihood. Additionally, we investigated models including background prey mortality or growth. Based on our results, we give the following recommendations:

While our new ODE-approach generally yields unbiased estimates in simulated experiments by correcting for prey depletion, direct methods (without requiring numerical simulation) perform equally well when using the type II (q = 0) or strict type III models (q = 1). The explicit solution RRPE-II-LambertW (Equation 7) by Bolker (2008) can be used for fitting type II responses. For type III responses, we propose using the explicit version (Equation 10) of Hassell's approach (Hassell et al., 1977), as the fit of an analytical solution is much faster than fitting simulations to data (see Supporting Information 1 Section 6).

However, when including the attack exponent q as a free parameter, only the numerical simulation of ODEs guarantees unbiased estimates in our simulated experiments. This is of utmost importance for ecological research, as even a small shift of the attack exponent, q, from 0 (strict type II functional response) to approximately 0.2 (e.g., Williams & Martinez, 2004) increases the stability of trophic ecological networks (i.e., food webs) and thereby increases the species coexistence and biodiversity (Rall et al., 2008). Studies empirically investigating the attack exponent have increased in number over the last several years (Barrios-O’Neill et al., 2014b, 2016; Kalinkat et al., 2013; Uszko et al., 2015, 2017b; Vucic-Pestic et al., 2010). Such publications will benefit from our new approach because it allows ecologists to estimate the functional response parameters that are needed to understand the stability and diversity patterns in complex ecological communities more accurately.

In addition to these obvious and needed advancements, our ODE-based method is highly flexible. It is not limited to the three functional response models described here—indeed, any type of functional response describing prey-dependent feeding rates can be integrated. Using simulations of ODEs that are fitted to data further allows ecological modellers to include additional terms such as prey mortality or growth, as presented in this study. We showed, however, that control data are required to disentangle the effects of natural mortality or growth and predation.

In addition to this main article, we provided an in-depth description of our method as a manual, R-source files, and data. This will provide researchers who want to apply our method to their own functional response data with an easy entry into our methodology and the possibility to practice using the method with working examples before using it to analyse their own data. Moreover, the source files attached in the supplement can be adapted to include functional response models other than those used here (see Juliano, 2001 and Jeschke et al., 2002 for a variety of possible models). In addition, specific mortality and growth models can be incorporated, for example, using the Gompertz growth model instead of the logistic growth model—a growth model that is often used in microbiology (Fussmann et al., 2017; Paine et al., 2012).

We also show in the Supporting Information 1 Section 7 how data availability changes the outcome of parameter fitting. Generally, we found that even sparse data can be sufficient to estimate parameters correctly, but in particular, the estimation of handling time is highly uncertain if higher densities of prey are not measured in an experiment (Supporting Information 1 Figure 2).

While maximum likelihood estimation produces trustworthy point estimates, standard errors and confidence intervals rely on a quadratic approximation of the log-likelihood function (Bolker, 2008). For more accurate confidence intervals, resampling methods such as bootstrapping can be used (e.g., Pritchard et al., 2017). Bayesian data analysis is more complex to implement and computationally more expensive, but it provides full probability distributions of the estimates. The deBInfer package (Boersch-Supan, Ryan, & Johnson, 2017) allows fitting ODEs to data in a Bayesian framework. An application of fitting ODE models to feeding experiments using Bayesian methods can be found in Fussmann et al. (2017).

In conclusion, we found that our new method to estimate functional response parameters from a feeding experiment with prey depletion—the decrease of prey number over time without replacement—has advantages over traditional approaches. To our knowledge, it is the only method that allows the precise parameter estimation of the generalized functional response, which is currently one of the most frequently used descriptions of feeding interactions in ecology. It moreover allows easy adaptation and the inclusion of unwanted effects such as prey growth and mortality, which is impossible with traditional approaches. We believe that our approach to estimate functional response parameters will enable researchers to better estimate parameter values using mortality- and growth-biased data in the future and thereby deepen the understanding of how interactions drive stability and biodiversity of complex ecological communities.

ACKNOWLEDGEMENTS

We gratefully acknowledge the support of the German Centre for integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig funded by the German Research Foundation (FZT 118). This work was supported by the NIOO strategic fund. Moreover, we want to thank Steven Declerck and Martijn Bezemer who hosted BCR at NIOO. We acknowledge support from the iDiv Open Science Publication Fund. We thank Christian Guill for providing the analytical derivation of the RRPE from an ODE including a type II functional response. We thank Arnaud Sentis as well as Louise Archer, Esra Sohlström, Bruno Gallo, Malte Jochum, Guy Woodward, Rebecca L. Kordas, Eoin J. O’Gorman and Katarina Fussmann for providing data that we could reanalyse. We are grateful for authors that make their data freely available from Barrios-O’Neill et al. (2014a,b); Uszko et al. (2017a,b); this allowed us to perform this study. Last but not least, we want to thank Callum Lawson and Gregor Kalinkat for proofreading and helpful comments on our manuscript. The authors declare no conflict of interest.

AUTHORS’ CONTRIBUTIONS

B.R. and B.C.R. contributed equally to the manuscript and gave final approval for publication.

DATA ACCESSIBILITY

We attached an in-depth description of the fitting methods in the manual, additional R-source files required to reproduce our method as well as the required data (D1 to D3, D7, and D8) can be found under https://doi.org/10.5061/dryad.kb76qj8. Data D3 is part of a bigger dataset available under https://doi.org/10.5061/dryad.kb00n (Uszko et al., 2017a); data D4 to D6 are available under https://doi.org/10.5061/dryad.v56t9 (Barrios-O’Neill et al., 2014a).