The structure of food webs is frequently described using phenomenological stochastic models. A prominent example, the niche model, was found to produce artificial food webs resembling real food webs according to a range of summary statistics. However, the size structure of food webs generated by the niche model and real food webs has not yet been rigorously compared. To fill this void, I use a body mass based version of the niche model and compare prey-predator body mass allometry and predator-prey body mass ratios predicted by the model to empirical data. The results show that the model predicts weaker size structure than observed in many real food webs. I introduce a modified version of the niche model which allows to control the strength of size-dependence of predator-prey links. In this model, optimal prey body mass depends allometrically on predator body mass and on a second trait, such as foraging mode. These empirically motivated extensions of the model allow to represent size structure of real food webs realistically and can be used to generate artificial food webs varying in several aspects of size structure in a controlled way. Hence, by explicitly including the role of species traits, this model provides new opportunities for simulating the consequences of size structure for food web dynamics and stability.
Citation: Klecka J (2014) Modelling Size Structured Food Webs Using a Modified Niche Model with Two Predator Traits. PLoS ONE 9(8): e99355. https://doi.org/10.1371/journal.pone.0099355
Editor: Luís A. Nunes Amaral, Northwestern University, United States of America
Received: December 13, 2012; Accepted: May 13, 2014; Published: August 13, 2014
Copyright: © 2014 Jan Klecka. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Funding: The study was supported by ERASMUS scholarship and the Grant Agency of the University of South Bohemia (grant no. GAJU 145/2010/P). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: This author has declared that no competing interests exist.
Animal communities form complex networks of interspecific interactions; the most traditionally studied type of such networks is the food web . It is widely recognized that stability of food webs is driven by non-random features of food web structure –. Trophic links typically depend on the size of predators and prey – and it has been shown that predator-prey body mass ratios can affect food web stability , . Hence, we need to develop models that faithfully represent the empirically observed dependence of predation links on body masses of predators and prey to gain better insights into the structure and stability of food webs.
The lack of mechanistic models using body mass to explain or predict food web structure ,  is surprising given that the role of body mass for structuring food webs has been recognized already at least by Elton almost a century ago . On the other hand, a family of phenomenological stochastic food web models has been developed with the intention to mimic the structure of real food webs using a set of simple rules which do not invoke any specific mechanisms. A prominent example is the niche model  which assumes that predators feed on a contiguous range of prey sorted along a single niche axis. The assumption of intervality has been relaxed in recent extensions of the model –; however empirical food webs are close to intervality , , , so the assumption of intervality is a reasonable simplification. It has been speculated that body mass is the key trait defining the position of species on the niche axis ,  and a body mass based version of the niche model, which makes this assumption explicit was published recently , . The original niche model and its modifications have been found to describe the structure of real food webs faithfully , , , , . However, this conclusion was based almost exclusively on comparison of several summary statistics of food web structure between model generated and real food webs. The relationship between predator and prey body mass was not among them because the original niche model and most of its modifications ,  do not include any information on species body masses (but see , ). However, it is widely recognized that predator and prey masses are strongly correlated in real food webs –. Testing whether this correlation is reproduced by theoretical food web models is of utmost importance.
There is also mounting evidence that other traits than body mass can modify the probability or strength of predator-prey links , such as foraging mode of the predator , . Models relating multiple species traits to the probability of feeding interactions  and interaction strength  have already been developed. These statistical models can be directly fitted to empirical data and used to test the importance of different species traits for feeding interactions . However, the focus of this paper is on stochastic models, such as the niche model and its extensions. These models have usually been compared to empirical data indirectly by various metrics of food webs structure , , although methods allowing to calculate model likelihood for directly comparing predicted and observed links have been recently developed , , . These models are also prominently used in simulation studies of food web dynamics. They can be used to generate artificial food webs with specified properties; these model food webs can be used to explore the consequences of food web structure for dynamics, for example to test the effects of predator-prey mass ratios ,  or connectance ,  on food web stability.
Here I test whether a body mass based modification of the niche model represents size structure of feeding interactions in food webs realistically. Moreover, I introduce a novel extension of the niche model which directly includes empirically observed prey-predator body mass allometry –. Finally, I include a second trait modifying prey size selectivity of predators , . The aim of these empirically motivated modifications of the niche model is to develop a simple stochastic food web model capturing the size structure of a wide range of food webs. Such a model will be valuable for exploring the consequences of size structure for food web dynamics and stability in future simulation studies.
Materials and Methods
The original niche model
The niche model , referred to as “the original niche model” here, predicts the occurrence of feeding links in a food web with species. Each potential link is an element of an adjacency matrix , where is a potential consumer of species . A link is either present () or absent (). Key characteristics of the original niche model are that species can be sorted along a single niche axis, which defines a feeding hierarchy, and that the diets of consumers contain species distributed along a contiguous section of the niche axis . Using only two parameters, species richness (S) and connectance (C), the original niche model generates a food web matrix using a simple set of instructions. Each species is assigned a position on a one-dimensional niche axis by drawing a random number from a uniform distribution on an interval , diet breadth and the centre of the feeding niche from the interval . Then, feeding links are assigned to all predator-prey combinations where a prey has within the range of for predator . The original niche model produces interval food webs, i.e. webs where each predator feeds on a contiguous range of prey along the niche axis. Another characteristic is that constraints on possible prey a predator can eat are weak and consequently there is only a small set of forbidden links (sensu , ). A predator can potentially feed on any prey with and also on many prey with ; up to 50% of a predator's diet can have higher than the predator's .
Although it has been shown that body mass can be used as a basis for sorting species in food webs –, , , , the original niche model does not assume that predator-prey interactions depend on body mass. The niche value is an abstract value, which limits the applicability of the niche model to address specific biologically relevant questions about the role of body mass for food web stability. To circumvent this problem, it has been proposed that one can transform the niche value to body mass of species as , where is a parameter fixing maximal predator-prey mass ratio, which is . However, a direct way to incorporate body mass into the niche model was recently developed ,  (see below).
The body mass based niche model
A body mass based modification of the niche model uses body mass to calculate species niche values , . Several body mass based versions of the niche model developed by Williams et al.  also include other changes to the niche model. However, in its simplest form used here, the only difference compared to the original niche model is that the niche value is a function of body mass:(eq. 1)where is body mass of species , and is the mass of the smallest and the largest species in the food web, respectively. I will refer to this model as the “body mass based niche model”. Stouffer et al. , Allesina et al.  and Williams et al  introduced further modifications of the niche model allowing for non-contiguous diets but I do not consider this aspect here because diets in real food webs have usually high degree of intervality , , . Hence, the body mass based niche model explicitly assumes that body mass controls trophic position of individual species but otherwise the structure of the food webs generated by this model is identical to the original niche model. Code to generate food web structure (written in R) is avalaible as Supporting Information (Script S1).
Introducing the two traits allometric model
Here I propose further extensions of the body mass based niche model to incorporate predator-prey body mass allometry well known from empirical data and include a second predator trait to move from a simple body mass dependence of predator-prey interactions to multiple-trait based approach , , . The centre of the feeding range of a predator is constrained to be a function of predator's body mass . Empirical data show that predator's optimal prey mass is allometrically related to its body mass :(eq. 2)for a predator –. This empirically derived predator-prey mass allometry is explicitly included in the model: the centre of the predator's feeding range equals to the niche value of a prey with mass ; i.e., predator's feeding range is centred on a prey with the optimal mass for a given predator:(eq. 3)where is the centre of predator's feeding niche and is the optimal prey mass for predator . The second modification I propose is an inclusion of a second predator trait which modifies the optimal prey mass for a predator . It models a situation when equally sized predators differing in foraging mode or another trait prefer prey of different sizes , . An illustrative example is shown in Figure 1. Specifically, I modify the allometry of predator mass and optimal prey mass (eq. 2):
An illustrative example of a small food web (9 species); each species is displayed on the x-axis as a predator and on the y-axis as a prey (the smallest species is a non-predatory basal species). The black line shows an allometric relationship between predator mass and optimal prey mass, large orange circles show the prey closest to the optimal prey mass for individual predators and smaller blue circles show other predator-prey links present in the network. In (A) optimal prey mass depends allometrically only on predator mass. In (B) optimal prey mass depends also on a second trait of a predator (a foraging trait), which causes deviations from the prey-predator body mass allometry depicted by the black line. Many real food webs are characterized by such a blurred relationship between prey and predator body masses.
(eq. 4)where denotes the effect of a second trait on the optimal prey mass for a predator . I will refer to this model as the “two traits allometric model”. I treat as an unknown, or latent, trait  in the simulations. Because it is related to foraging behaviour of predators, I call it here a “foraging trait”. I include the effect of the foraging trait on optimal prey mass of each predator by drawing a random value from a truncated normal distribution and inserting it into the formula above (eq. 4). I used mean various values of standard deviation ; lower bound and upper bound was set to ensure that predator's , which is a function of (see eq. 3), lies within the range set by the basic constraints of the niche model; i.e. in the interval . The effect of the second trait is independent of predator body mass ( and are uncorrelated). The strength of the effect of the second trait relative to body mass can be manipulated by the choice of of the truncated normal distribution used to generate the values of . Thanks to this feature, the two traits model covers the whole range of possibilities from the strictly size-dependent predation when (eq. 2) to the very weak size constraints of the body mass based niche model ( very large). For sufficiently large values of the two traits model converges to the body mass based niche model described above , , where the centre of the feeding niche is drawn uniformly from the interval . Intermediate cases can be easily achieved by an appropriate choice of the standard deviation . A function rtruncnorm in the truncnorm package for R was used to sample from the truncated normal distribution . Code to generate food web structure (written in R) is avalaible in Script S1.
Analysis of the structure of model food webs
I carried out extensive simulations in R 2.15.1  to analyse the structure of model food webs generated by the body mass based niche model and its modifications described above. I also compared the results to those based on the original niche model where body mass is calculated post hoc from niche values as for species , where is a parameter fixing maximal predator-prey mass ratio, as described by Heckmann et al. . To generate food webs with predator-prey interactions depending on species body mass using the body mass based niche and two traits models, I first set the number of species ( in the main results) and their body masses. Since the distribution of body masses is known to follow approximately a log-normal distribution, I assigned body masses to all species by randomly generating numbers from a log-normal distribution with and ; the value of corresponds to total size range in the food web on average 10 orders of magnitude, which may represent, for example, a freshwater food web with species ranging from small zooplankton () to large fish (). The effect of total mass range on the resulting food web structure was further explored by changing the value of of the log-normal distribution of body masses. In all results reported here, I set connectance ( effectively controls the mean diet breadth of consumers) and excluded food webs with differing from the target value by more than 3%, which is a standard procedure (e.g. , ). In the case of the two traits allometric model, I also fixed the values of parameters describing the allometry of predator and prey masses (eq. 4). I set to get a predator-prey mass ratio of 37.7 for a predator of body mass and ; these values are based on published analyses of a large database of predator-prey interactions –. I set the standard deviation of to several different values, which leads to a range of situations differing in the strength of the size dependence of feeding links. I also included the special case of , where the effect of the second trait is absent and optimal prey mass depends only on predator mass (eq. 2).
In the case of the original niche model, a different approach had to be used. I set the number of species and connectance as above and generated food web structure. Then, I calculated body masses form the niche values (instead of calculating niche values from body masses) using a method proposed by Heckmann et al. . Here, for species , where is a parameter fixing maximal predator-prey mass ratio, which is . I set the value of to match the mean value of total body mass range in the other models. This leads to a close correspondence between the original and body mass based niche models. Comparison of the results between these two models thus shows the consequences of the choice to (1) either generate niche values first and then use them to calculate body masses or (2) to use the opposite, arguably more natural, procedure of specifying species body masses first and then using them to calculate niche values. Distribution of body masses differs in these two cases because in the original niche model I calculated body masses as  and is uniformly distributed on the interval . Hence, is uniformly distributed, while in the body mass based niche and two trait models, body masses were generated from a log-normal distribution.
Food webs generated by the models were compared using several measures of network structure. I analysed the prey-predator body mass allometry using standardized major axis regression (SMA regression), which is frequently used to estimate allometries because it treats errors in both the explanatory and response variable equally ; the package smatr for R was used . The analysis of size structure of model food webs was complemented by a comparison of twelve summary statistics commonly used to describe food web topology (e.g. , , ). The metrics used were: the proportion of basal, intermediate and top species, the proportion of herbivores, mean and maximum trophic level, mean omnivory level, clustering coefficient, standard deviation of generalism and vulnerability, maximum diet similarity and mean path length (the definitions follow ). I refrained from comparing these metrics directly to real data because improving the, already good, fit of the niche model was not an objective of this paper and because the utility of such comparisons for evaluating food web models is limited . I instead focused on comparing the different models among themselves to test whether the changes in size structure in these models lead to changes in other structural properties.
Species richness and connectance were kept constant, although these parameters are important for addressing other questions, such as stability and robustness of food webs , . In the simulations reported here, species richness had no effect on the results and connectance only controlled mean diet breadth of predators, which slightly changed the quantitative output of the simulations but had no effect on comparing the models. Values of and were tested in additional simulations (results not shown) to verify that the results and conclusions presented here are robust.
Body mass structure of model food webs
Both the original niche model and the two traits model produce food webs with the distribution of predator-prey body mass ratios (PPMR) comparable to empirical data from different habitats (Figure 2). Food webs generated by the original niche model have median PPMR = 253.8, while food webs produced by the two traits allometric model with no, weak and strong effect of the foraging trait have median PPMR = 191.4, 122.4 and 79.1, respectively. The empirical data have median PPMR = 87.1, 5.3 and 62.6 for freshwater, terrestrial and marine data, respectively. With increasing importance of the role of the foraging trait, the constraints set by the allometric dependence of optimal prey mass on predator mass are getting weaker, which leads to broader range of PPMR values (Figure 2). A notable difference from the empirical data is that all the models predict smaller numbers of interactions where predator is smaller than its prey than observed in empirical food webs (negative values of in Figure 2).
The distributions of predator-prey body mass ratios produced by different models and real data from freshwater, marine and terrestrial predatory interactions (data from ). In the case of model data, results of 200 simulations of food web matrices with species and are presented for each model. In the case of the two traits allometric model, body masses were drawn from a lognormal distribution ( and ); this setting leads to the total body mass range in individual food webs ca. 10 orders of magnitude). Optimal prey mass is given as , where is predator mass and denotes the effect of a predator's foraging trait on the optimal prey mass. Settings of the foraging trait are (no effect), and (weak effect), and and (strong effect). See the methods section for more details. Plot shows estimated probability density functions with colours representing intervals with a given percentage of observations around the median (see the legend).
Individual models differ in the strength of the effects of predator and prey mass on the probability of occurrence of individual feeding links; also the set of “forbidden” links (i.e. links that never occur) varies (Figure 3). In the case of the two traits allometrical model with no effect of predator foraging trait, all interactions are constrained to a narrow band around the allometry of optimal prey and predator mass, and probability of the occurrence of feeding links decreases sharply with increasing difference from the allometry (Figure 3 A). With increasing importance of the predator foraging trait (and hence decreasing role of body mass constraints), the set of forbidden links decreases (Figure 3 B and C). In the original niche model, predators can feed on a wide range of prey and consequently, all links have a low probability of occurrence () (Figure 3 D), as in the two traits allometric model with strong effect of predator foraging trait (Figure 3 C). The dependence of link probability on predator and prey masses holds independently on the total body mass range of species in a food web (not shown).
Results of 1000 simulations of food web matrices with species and using the same models as in Figure 2. The dotted diagonal line denotes situations when prey is of the same size as its predator; values above this line mean that predator is smaller than its prey. The colours show the probability of occurrence of feeding interactions between predator and prey of a given size in the simulated food webs (see the legend). The difference of values in (C) and (D) is small; for of corresponding predator-prey pairs the difference in link probability is less than 0.05.
The prey-predator body mass allometry in model food webs with total body mass range of 10 orders of magnitude (Figure 2 and Figure 3) was similar in different models. The intercept estimated by SMA regression was −2.1, −1.9, and −2.1 in the two traits allometric model with no, weak and strong effect of predator foraging trait and −2.6 in the original niche model. The slope of the allometry was 0.91, 0.92, and 0.94 in the two traits allometric model with no, weak and strong effect of predator foraging trait and 0.98 in the original niche model. However, as already clear by the inspection of Figure 3, the amount of variance of prey body masses explained by predator body mass varied considerably: 82.7%, 58.8%, and 26.5% in the two traits allometric model with no, weak and strong effect of predator foraging trait and 35.1% in the original niche model.
Total body mass range of the food webs () affected the estimated intercept of the prey-predator body mass allometry in the original niche model (Figure 4 D). There was a sharp decrease in the intercept with increasing size range of the food webs; the same holds for the two traits allometric model with strong effect of the foraging trait (Figure 4 C). On the other hand, the intercept was almost independent of the total mass range of the food webs generated by the two traits allometric model with no or weak effect of the foraging trait (Figure 4 A and B). The slope of the prey-predator body mass allometry and the amount of explained variance were not or only weakly dependent on the total size range of the food webs (Figure 4).
The intercept, slope and explained variance of the dependence of on are plotted against the total mass range of the food webs. Parameters were estimated by standardized major axis regression. The same set of model food webs as in Figure 2 was used. Colours represent intervals with a given percentage of observations around the median (see the legend).
Mean PPMR and the range of PPMR values increased considerably when the total body mass range was increased from to in the original niche model and the two traits allometric model with strong effect of the foraging trait (Figure 5 C and D). On the other hand, mean PPMR was independent of the total mass range and the range of PPMR values changed less in the two traits allometric model with no or weak effect of the foraging trait (Figure 5 A and B).
Plots show the values of predator-prey body mass ratios plotted against the total mass range of the food webs (). The total mass range was manipulated by changing the value of of the log-normal distribution of body masses in the case of the two traits allometric model and by changing the values of the parameter in the case of the niche model (see methods for details). Colours represent intervals with a given percentage of observations around the median (see the legend).
Summary statistics of food web structure
Most summary statistics of food web structure varied systematically from the two traits allometric model with no effect of the foraging trait to the model with strong effect of the foraging trait (Figure 6). However, the distributions of all summary statistics overlapped (99% intervals overlapped in all metrics; in most cases the overlap was much larger), so the difference between model settings was not significant. The largest difference between the model with no and strong effect of the foraging trait was found in the case of maximum similarity (Figure 6 H), which reflects the fact that similarly sized predators have very similar diets when predator-prey links are driven only by body mass. The comparison of the two traits allometric model with strong effect of the foraging trait and the original niche model revealed no significant differences (Figure 6). However, it is noteworthy that the original niche model tends to produce slightly less basal, herbivorous and top species (median number of top species is zero) and more intermediate species (Figure 6 A, B, C and I). This pattern is connected to slightly higher level of omnivory in the original niche model food webs (Figure 6 J).
Box-plots show the values of twelve metrics of food web structure calculated for a set of 200 food webs generated by each of the three settings of the two traits allometric model and the niche model with species and . The same set of model food webs as in Figure 2 was used. The metrics shown are: proportion of basal (A), intermediate (B) and top (C) species, standard deviation of generality (D) and vulnerability (E), mean (F) and maximum (G) trophic level, maximum diet similarity (H), proportion of herbivores - i.e. consumers of basal species (I), mean omnivory level (J), clustering coefficient (K) and mean characteristic path length (L). Box-plot shows estimated intervals around the median (black circle) where a given percentage of observations lies: see the legend in the lower left corner.
Summary statistics of food web structure varied with the total body mass range in the case of the two traits allometric model with no or weak effect of the foraging trait, while they were independent of the total body mass range in the original niche model and in the two traits allometric model with strong effect of the foraging trait (Figure 7). The observed sensitivity of the food web metrics to changes in the total body mass range results from the fact that prey mass depends allometrically on predator mass with a slope in the case of the two traits allometric model with no or weak effect of the foraging trait. As the total body mass range increases, small predators become more similar in body mass to their prey and large predators become less similar to their prey (Figure 8). This alteration of the size structure of the food webs results in changes in summary statistics of food web structure (Figure 7).
The values of the same 12 metrics as in Figure 6 are plotted against the total body mass range in the food web (orders of magnitude) for individual models. Colours represent intervals with a given percentage of observations around the median (see the legend in the upper right corner).
Results of 1000 simulations of food web matrices with species and for four different values of the total body mass range: (A), (B), (C), and (D). The dotted line denotes situations when prey is of the same size as its predator; values above this line mean that predator is smaller than its prey. The colours show the probability of occurrence of feeding interactions between predator and prey of a given size in the simulated food webs (see the legend).
A plethora of different types of models seeking to explain food web structure has been developed in last several decades. Although truly mechanistic models attempting to predict food web structure based on optimal foraging have been developed recently , , most of the models published so far are stochastic phenomenological models which generate more or less random food webs using a simple set of instructions. A prominent example is the niche model  which produces model food webs successfully mimicking real food webs according to comparisons of summary statistics, such as the proportion of top, intermediate and basal species to real data , . A pitfall of this approach is that a model may reproduce chosen metrics faithfully but still may fail to capture other untested aspects of food web structure; one of these is the relationship between predator and prey body mass. This paper aimed to evaluate the performance of the original niche model and its new empirically driven extensions in describing size structure of real food webs.
How well do the models capture real-world predator-prey body mass relationships?
The most apparent difference between real data and predator-prey mass ratios (PPMRs) in model generated food webs is that real food webs seem to contain a large proportion of predators feeding on prey larger than themselves (Figure 2). This could be partly an artifact caused by aggregating data on the species level instead of analysing them on the individual level, because many species, such as fish, grow in size over many orders of magnitude during ontogeny. When adults of a small species feed on juveniles of larger species, but the food web is analysed using species average or asymptotic body masses, we may draw a link where a predator is smaller than its prey. However, at the individual level, the predator may actually be larger than its prey , . Moving towards individual-based approaches in food webs is highly desirable for gaining novel insights , but most currently available data and current food web models use the species level.
The original niche model does not capture the relationship between predator and prey masses faithfully compared to empirical data. When the total mass range is set to 10 orders of magnitude, mean PPMR and the slope of the prey-predator mass allometry estimated by SMA regression correspond well to real data (Figure 2, –), although there is a lot of variation among individual simulations. However, the variance of prey body mass explained by predator body mass was only ca. 35% in the original niche model, compared to 86% in the analysis of empirical data by Brose et al. , which means that real food webs have much tighter prey-predator body mass allometry. Moreover, the intercept of the allometry and the range of PPMR values strongly depended on total range of body masses in the food web. This result stems from the fact that the niche model imposes only very weak constraints on predation – a predator can feed on any prey which is smaller than the predator and also on many larger prey species. Hence, maximum predator-prey mass ratio increases linearly with increasing total range of body masses in the food web (Figure 4). Cases when a large predator feeds on very small prey, such as whales feeding on krill are recognized as exceptions from general size-dependence of predatory interactions –. High sensitivity of the niche model predictions of the prey-predator body mass allometry to changes in the total mass range (Figure 5) limits the utility of the niche model to study the effect of predator and prey masses on food web stability , .
The two traits allometric model generates food webs that capture predator-prey body mass relationships in real food webs well. When the effect of predator foraging trait is absent and predation is governed exclusively by prey-predator body mass allometry, predator mass explains on average 82% of prey mass variance, which corresponds to empirical data analyses by Brose et al.  (). The proportion of variance in prey mass explained by predator mass decreases as the effect of the predator foraging trait increases. Importantly, the prey-predator mass allometry and mean PPMR do not depend on the total mass range unlike in the original niche model. However, with increasing total mass range, the range of PPMR values increases (Figure 5) as a natural consequence of the fact that because connectance remains fixed in the simulations (i.e. the mean number of prey species consumed by a predator does not change with body mass range), predators feed on prey of body masses deviating more strongly from the optimal prey mass. However, this effect is much weaker than the increase of the range of PPMR values in the body mass based niche model (Figure 5). This effect would be moreover counteracted if total body mass range increases in food webs with increasing species richness and decreasing connectance, which has been empirically observed –. By changing the value of the standard deviation of the truncated normal distribution used to assign the values of the foraging trait , the model can cover the whole spectrum of food web size structure from that typical for the original niche model ( very large) to that observed when the effect of foraging trait is absent and interactions are driven exclusively by body mass ( close to 0). The role of body mass also varies among real food webs from different habitats and with different types of consumers , , , , . In some food webs, the role of other traits may be even more important that the role of body mass . The two traits allometric model captures a large part of this natural spectrum of food web structures depending on its parameter values.
Are there differences in food web structure among the models?
The comparison of twelve standard descriptors of food web structure (Figure 6) shows that although the three models differ in the size structure, most summary statistics of food web structure have similar values. These results suggest that many of these metrics are not tightly coupled with the size structure of food webs. This allows a model that makes not entirely realistic assumptions about the role of body mass in structuring food webs (i.e. the body mass based niche model) to provide very good fit to empirical food webs when the fit is judged by comparing values of summary statistics of food web structure , . There are other means of comparing food web models to empirical data, such as comparing the proportion of correctly predicted links or calculating model likelihood , , , . However, fitting models to real data on food webs remains a tricky task  which may suffer from limitations beyond the choice of the appropriate metrics. Sampling effects may bias empirical descriptions of food web structure , , which is certainly true also in the case of size structure because many common sampling methods are size selective and provide a distorted view of community composition in aquatic (e.g. –) as well as terrestrial (e.g. –) habitats. Moreover, I argue that stochastic structural food web models are better suited for studies simulating food web dynamics than for fitting to real data because they only describe food web structure without providing mechanistic explanations . For the purpose of simulation studies, it is important that manipulating the size structure of food webs using the two traits allometric model has only minor consequences for other structural properties of food webs.
The original niche model  produces webs that are interval and species with similar niche value share predators but can still feed on different prey. Diet contiguity is retained in the two traits allometric model for the sake of simplicity because real food webs usually have high degree of intervality , , . The two traits model allows species with similar body masses to feed on different prey because the second trait affects prey size preference of the predators. The inclusion of such a predator trait was motivated and is supported by empirical studies showing that foraging mode affects prey size selectivity of some predators. For example, filter-feeding zoopklanton prefers smaller prey than equally sized raptorial zooplankton  and suctorial predatory aquatic insects feed on larger prey than chewing predators of equal mass .
Using these models to understand real food webs
The two traits allometric model could be used to fit empirical data by specifying masses of individual species based on measurements and by choosing the parameters of the allometry of optimal prey mass and predator mass corresponding to a real food web in question or by optimizing parameter values to obtain the best possible fit. Stochastic food web models have been fitted to empirical data in this fashion , , , , but the value of such comparisons is limited because the models are purely phenomenological and do not provide mechanistic insights . It has been shown that any model obeying a few simple constraints will fit real food web data similarly well . However, fitting models such as the body mass based niche model and the two traits allometric model can help to identify predators that deviate from predator-prey allometry obeyed by the rest of the species in the food web, have unusual diet breadth, etc. , . Such explorations might pinpoint species worth studying in more detail to explain why are they different. This may be a fruitful way of connecting phenomenological food web models with real-world data to gain novel biological insights.
The explicit inclusion of species body mass to the niche model ,  and the possibility to manipulate size structure of food webs by directly including prey-predator mass allometry and other modifying traits into the model, as demonstrated in this paper, makes these models an increasingly flexible tool. The importance of body mass for structuring real food webs varies –, so understanding the dynamical consequences of size structure is a key question of food web research , . The two traits model allows us to generate artificial food webs varying in size structure, which can be used in simulation studies of food web stability. Hence, this and similar models hold a significant promise for addressing the role of size structure of food webs for their dynamics and stability in a more detailed and direct way then was possible in previous studies.
I did not include prey traits other than body mass in the modifications of the niche model discussed in this paper for the sake of simplicity. However, recent results suggest that closely related prey are consumed by similar sets of predators but closely related predators have less similar diets; this asymmetry of the role of species similarity may be a consequence of differences in the roles of predator and prey traits . New approaches in food web modelling based on multiple species traits , ,  clearly hold a significant promise in moving towards more realistic descriptions of food web structure as they enable us to predict interaction strength based on biological traits of interacting species . Different types of food web models can complement one another to address a broad range of questions using appropriate tools; such as trait-based models to predict individual feeding links and interaction strengths and stochastic structural models to study the links between structure and dynamics by simulation studies.
R script containing the code for the models used in the paper. The script contains a function niche.model which generates a food web using the original niche model and calculates species body masses from the niche values, a function niche.replicated which produces a list of n webs based on the original niche model, a function two.traits.model which generates a food web using the two traits allometric model and a function two.traits.replicated which produces a list of n webs based on the two traits allometric model.
I would like to thank Andrew P. Beckerman, Ludek Berec and David S. Boukal for stimulating discussions about food webs. Computation of summary statistics of food web structure was carried out partly using Owen L. Petchey's code freely available on his website (http://www.thetrophiclink.org/resources/food-web/).
Conceived and designed the experiments: JK. Performed the experiments: JK. Analyzed the data: JK. Contributed reagents/materials/analysis tools: JK. Wrote the paper: JK.
- 1. Elton CS (1927) Animal Ecology. New York, 397 USA: Macmillan Co.
- 2. de Ruiter PC, Neutel AM, Moore JC (1995) Energetics, patterns of interaction strengths, and stability in real ecosystems. Science 269: 1257–1260.
- 3. McCann K, Hastings A, Huxel GR (1998) Weak trophic interactions and the balance of nature. Nature 395: 794–798.
- 4. Neutel AM, Heesterbeek JAP, de Ruiter PC (2002) Stability in real food webs: weak links in long loops. Science 296: 1120–1123.
- 5. Warren PH, Lawton JH (1987) Invertebrate predator-prey body size relationships: an explanation for upper triangular food webs and patterns in food web structure? Oecologia 74: 231–235.
- 6. Cohen JE, Pimm SL, Yodzis P, Saldana J (1993) Body sizes of animal predators and animal prey in food webs. Journal of Animal Ecology 62: 67–78.
- 7. Woodward G, Ebenman B, Emmerson M, Montoya JM, Olesen JM, et al. (2005) Body size in ecological networks. Trends in Ecology and Evolution 20: 402–409.
- 8. Brose U, Jonsson T, Berlow EL, Warren P, Banasek-Richter C, et al. (2006) Consumer-resource body-size relationships in natural food webs. Ecology 87: 2411–2417.
- 9. Bersier LF, Kehrli P (2008) The signature of phylogenetic constraints on food-web structure. Ecological Complexity 5: 132–139.
- 10. Naisbit RE, Kehrli P, Rohr RP, Bersier LF (2011) Phylogenetic signal in predator-prey body-size relationships. Ecology 92: 2183–2189.
- 11. Riede JO, Brose U, Ebenman B, Jacob U, Thompson R, et al. (2011) Stepping in Elton's footprints: A general scaling model for body masses and trophic levels across ecosystems. Ecology Letters 14: 169–178.
- 12. Naisbit RE, Rohr RP, Rossberg AG, Kehrli P, Bersier LF (2012) Phylogeny versus body size as determinants of food web structure. Proceedings of the Royal Society B: Biological Sciences 279: 3291–3297.
- 13. Brose U, Williams RJ, Martinez ND (2006) Allometric scaling enhances stability in complex food webs. Ecology Letters 9: 1228–1236.
- 14. Heckmann L, Drossel B, Brose U, Guill C (2012) Interactive effects of body-size structure and adaptive foraging on food-web stability. Ecology Letters 15: 243–250.
- 15. Beckerman AP, Petchey OL, Warren PH (2006) Foraging biology predicts food web complexity. Proceedings of the National Academy of Sciences 103: 13745–13749.
- 16. Petchey OL, Beckerman AP, Riede JO, Warren PH (2008) Size, foraging, and food web structure. Proceedings of the National Academy of Sciences 105: 4191–4196.
- 17. Williams RJ, Martinez ND (2000) Simple rules yield complex food webs. Nature 404: 180–183.
- 18. Stouffer DB, Camacho J, Amaral LAN (2006) A robust measure of food web intervality. Proceedings of the National Academy of Sciences 103: 19015–19020.
- 19. Allesina S, Alonso D, Pascual M (2008) A general model for food web structure. Science 320: 658–661.
- 20. Williams RJ, Anandanadesan A, Purves D (2010) The probabilistic niche model reveals the niche structure and role of body size in a complex food web. PLoS ONE 5: e12092.
- 21. Stouffer DB, Rezende EL, Amaral LAN (2011) The role of body mass in diet contiguity and food-web structure. Journal of Animal Ecology 80: 632–639.
- 22. Zook AE, Eklof A, Jacob U, Allesina S (2011) Food webs: Ordering species according to body size yields high degree of intervality. Journal of Theoretical Biology 271: 106–113.
- 23. Williams RJ, Purves DW (2011) The probabilistic niche model reveals substantial variation in the niche structure of empirical food webs. Ecology 92: 1849–1857.
- 24. Stouffer DB, Camacho J, Jiang W, Amaral LAN (2007) Evidence for the existence of a robust pattern of prey selection in food webs. Proceedings of the Royal Society B: Biological Sciences 274: 1931–1940.
- 25. Rohr RP, Scherer H, Kehrli P, Mazza C, Bersier LF (2010) Modeling food webs: exploring unexplained structure using latent traits. American Naturalist 176: 170–177.
- 26. Wirtz KW (2012) Who is eating whom? morphology and feeding type determine the size relation between planktonic predators and their ideal prey. Marine Ecology Progress Series 445: 1–12.
- 27. Klecka J, Boukal DS (2013) Foraging and vulnerability traits modify predator-prey body mass allometry: freshwater macroinvertebrates as a case study. Journal of Animal Ecology 82: 1031–1041.
- 28. Rossberg AG, Brännström Å, Dieckmann U (2010) How trophic interaction strength depends on traits. Theoretical Ecology 3: 13–24.
- 29. Williams RJ, Martinez ND (2008) Success and its limits among structural models of complex food webs. Journal of Animal Ecology 77: 512–519.
- 30. Kondoh M (2003) Foraging adaptation and the relationship between food-web complexity and stability. Science 299: 1388–1391.
- 31. Berec L, Eisner J, Křivan V (2010) Adaptive foraging does not always lead to more complex food webs. Journal of Theoretical Biology 266: 211–218.
- 32. Jordano P, Bascompte J, Olesen JM (2003) Invariant properties in coevolutionary networks of plant-animal interactions. Ecology Letters 6: 69–81.
- 33. Olesen JM, Bascompte J, Dupont YL, Elberling H, Rasmussen C, et al. (2011) Missing and forbidden links in mutualistic networks. Proceedings of the Royal Society B: Biological Sciences 278: 725–732.
- 34. Trautmann H, Steuer D, Mersmann O, Bornkamp B (2012) truncnorm: Truncated normal distribution.
- 35. R Core Team (2012) R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing, Vienna, Austria.
- 36. Warton DI, Wright IJ, Falster DS, Westoby M (2006) Bivariate line-fitting methods for allometry. Biological Reviews of the Cambridge Philosophical Society 81: 259–291.
- 37. Warton DI, Duursma RA, Falster DS, Taskinen S (2012) smatr 3 - an r package for estimation and inference about allometric lines. Methods in Ecology and Evolution 3: 257–259.
- 38. Petchey OL, Beckerman AP, Riede JO, Warren PH (2011) Fit, efficiency, and biology: Some thoughts on judging food web models. Journal of Theoretical Biology 279: 169–171.
- 39. Dunne JA, Williams RJ, Martinez ND (2002) Network structure and biodiversity loss in food webs: Robustness increases with connectance. Ecology Letters 5: 558–567.
- 40. Woodward G, Warren PH (2007) Body size and predatory interactions in freshwaters: Scaling from individuals to communities. Body Size: The Structure and Function of Aquatic Ecosystems: 98–117.
- 41. Woodward G, Blanchard J, Lauridsen RB, Edwards FK, Jones JI, et al. (2010) Individual-based food webs: Species identity, body size and sampling effects. Advances in Ecological Research 43: 211–266.
- 42. Melián CJ, Vilas C, Baldó F, González-Ortegón E, Drake P, et al. (2011) Eco-evolutionary dynamics of individual-based food webs. Advances in Ecological Research 45: 225–268.
- 43. Schmid-Araya JM, Schmid PE, Robertson A, Winterbottom J, Gjerløv C, et al. (2002) Connectance in stream food webs. Journal of Animal Ecology 71: 1056–1062.
- 44. Montoya JM, Solé RV (2003) Topological properties of food webs: from real data to community assembly models. Oikos 102: 614–622.
- 45. Riede JO, Rall BC, Banasek-Richter C, Navarrete SA, Wieters EA, et al. (2010) Scaling of food-web properties with diversity and complexity across ecosystems. Advances in Ecological Research 42: 139–170.
- 46. Allesina S (2011) Predicting trophic relations in ecological networks: a test of the allometric diet breadth model. Journal of Theoretical Biology 279: 161–168.
- 47. Goldwasser L, Roughgarden J (1993) Construction and analysis of a large caribbean food web. Ecology 74: 1216–1233.
- 48. Bersier LF, Dixon P, Sugihara G (1999) Scale-invariant or scale-dependent behavior of the link density property in food webs: A matter of sampling effort? American Naturalist 153: 676–682.
- 49. Klecka J, Boukal DS (2011) Lazy ecologist's guide to water beetle diversity: Which sampling methods are the best? Ecological Indicators 11: 500–508.
- 50. Hamley JM (1975) Review of gillnet selectivity. Journal of the Fisheries Board of Canada 32: 1943–1969.
- 51. Harley SJ, Myers RA (2001) Hierarchical bayesian models of length-specific catchability of research trawl surveys. Canadian Journal of Fisheries and Aquatic Sciences 58: 1569–1584.
- 52. Jennings S, Dulvy NK (2005) Reference points and reference directions for size-based indicators of community structure. ICES Journal of Marine Science: Journal du Conseil 62: 397–404.
- 53. Mommertz S, Schauer C, Kosters N, Lang A, Filser J (1996) A comparison of d-vac suction, fenced and unfenced pitfall trap sampling of epigeal arthropods in agro-ecosystems. Annales Zoologici Fennici 33: 117–124.
- 54. Lang A (2000) The pitfalls of pitfalls: a comparison of pitfall trap catches and absolute density estimates of epigeal invertebrate predators in arable land. Journal of Pest Science 73: 99–106.
- 55. Sanders D, Entling MH (2011) Large variation of suction sampling efficiency depending on arthro-pod groups, species traits, and habitat properties. Entomologia Experimentalis et Applicata 138: 234–243.
- 56. Stouffer DB, Camacho J, Guimera R, Ng CA, Amaral LAN (2005) Quantitative patterns in the structure of model and empirical food webs. Ecology 86: 1301–1311.
- 57. Rossberg AG, Matsuda H, Amemiya T, Itoh K (2006) Food webs: Experts consuming families of experts. Journal of Theoretical Biology 241: 552–563.