 for resistance and tolerance). Performances of hosts allocating none of the available resources to resistance and tolerance are the highest at the start of infection (P t = 0 = P Max ) and decrease as C t increases. Numbers of pathogens remain below 20 among resistant hosts, and performances of tolerant hosts do not decline with increasing parasite burden.

Effectiveness analysis
The most profitable strategy, i.e. the one that will insure the lowest number of infected animals or the highest performance of the population, or both, was identified by weighing the allowed extra investments in resistance, tolerance, or both, against the effectiveness of each of these alternatives.
Effectiveness was computed by comparing populations under the same infection process but in which animals invest ('yes' population) or not ('no' populations) in resistance, tolerance, or both. To do so, the number of infected hosts (I t ) and the overall performance (P t = Σ i = 1,N P i t ) were followed across time, and the area under the curves of P t (AUC P ) and I t (AUC I ) were obtained for t = 0 to T with the spline method of the procedure Expand of SAS ® [16]. Subsequently, the incremental effects (ΔE I and ΔE P ) were computed as the difference between corresponding 'yes' and 'no' populations: ΔE I = AUC I no -AUC I yes, and ΔE P = AUC P yes -AUC P no. Then, the most effective alternative was identified as the one with the highest values for ΔE I and ΔE P.
Incremental effects were calculated for different sets of parameters (Table 1). Two transmission rates were considered, with β = 0.1 and β = 0.5, which correspond to a new infection per 10 and 2 effective contacts, respectively. The minimum number of pathogens was set to C min = 10 and the maximum to C Max = 500. The growth rate (γ) was set at 0.5 new pathogens for each existing one and the value for μ was set to 0.25 or 1.0 to obtain killing rates equal to half or twice the pathogen growth rate. A convenient value of 100 was given to P Max, while virulence (ω) was set at 0.1 or 0. Finally, effects of low, average and high levels of extrainvestments in resistance and tolerance on ΔE I and ΔE P were quantified using fixed linear models (proc GLM on SAS ® [16]) that also contained the effects of β, μ, and ω for the characteristics of the pathogen, the averages at the population level of h i, c i ρ and c i λ for the characteristics of the hosts, and all first-order interactions. The resulting least-squares estimates were used to identify epidemiological situations for which investments in tolerance, resistance or both were effective.

Within-host pathogen dynamics
The number of pathogens within a host is shown in Figure 2 for 10 animals in a 'no' population with the

Pathogen burden (C)
No resistance, no tolera nce Maximum resistance, maximum tolerance Maximum resistance, no tolerance No resistance, maximum tolerance Figure 1 Schematic representation of the impact of resource allocation on performance (P) and number of pathogens (C).
following characteristics: β = 0.5; μ = 0.1; ω = 0.1; h iŨ [0, 0.001], and ρ i = λ i = 0 for i = 1 to N. The duration and the number of pathogens generated were approximately the same for all animals because they depended on γ = 0.5 (equation 2). However, the stochastic nature of the simulation resulted in a cloud of points for each C i t. On average, C Max was reached after 300 time units, so it was used as the upper limit for T because the Gillespie algorithm was slow to converge and because T = 300 insured the steady value C Max was reached among completely non-resistant hosts.
In Figure 3, the dynamics in C i t and P i t are shown for four individuals with different investments and costs of resistance and tolerance, and for an infection with β = 0.5, γ = 0.5, ω = 0.2, h i~U [0, 0.1], and μ = 0.25. When both ρ i and λ i were high, C i t remained low and P i t did not change much across time (individuals □ or +). Conversely, when ρ i was low, C i t increased up to its maximum and the associated individual performance decreased (individual ○ in Figure 3). Between these extremes, a wide range of different situations occurred. Initial performance (P 0 ) varied according to the costs and extra investments in tolerance and resistance (equation 3).

Between-host pathogen dynamics
The number of infected hosts (I t ) and the overall performance (P t ) are given in Figure 4 as percentages of their maximum values (N and P Max, respectively) and for an infection with β = 0.5, γ = 0.5, ω = 0.1, and μ = 0.25. At T = 300, all individuals in the 'no' population ( Figure 4a) were infected (with the exception of one) and the overall performance was close to 50%, which is the minimum expected from equation 5 when all  When the average level of extra investments in tolerance was high (around 0.95), the impact of I t on P t was almost zero (Figures 4d,g  and 4j). Otherwise, P t decreased as I t increased, especially for low levels of tolerance (Figures 4b,e and 4h). This should have translated in an increase in AUC P but, in this particular population, costs associated with tolerance were high (around 0.15) and initial performance was low. For example, P 0 averaged 79.8 in Figure 4g

Effectiveness analyses
Values of ΔE P and ΔE I obtained for each combination of the parameters of Table 1 are shown in relation to ρ and λ in Figure 5. Each dot corresponds to one specific combination of the parameter values. Effective combinations, those associated with both ΔE P >0 and ΔE I >0, represented 75.7% of all combinations. There was a tendency for ΔE I and ΔE P to increase with increasing values for ρ and λ, respectively. However, there were also combinations of parameters for which high values for ρ or λ were not effective, as revealed by the analysis of variance.
Results from the analysis of variance identified significant (p < 0.01) effects of ρ i, c ρ, h i, and μ on ΔE I, and of λ, c λ, β, and ω on ΔE P. All first-order interactions were non-significant (p > 0.10). Incremental effects are given in Tables 2 and 3 for selected combinations. Overall, ΔE P was greater for higher values of λ but, for moderately virulent (ω = 0.1) and slow spreading (β = 0.1) diseases, investments in tolerance were low or ineffective unless they incurred at low costs ( Table 2). Investing in resistance (Table 3) was effective for infections that elicited moderate to high but not low (h i~U [0, 0.001]) immune responses in the hosts (unless levels of resistance were high).

Discussion
A general framework is proposed to provide insights into the effects of improved resistance and tolerance on the performance and size of an infected population. A clear distinction is made between effects of resistance on multiplication of the pathogen and effects of tolerance on damages induced by the pathogens. Hosts differ in the costs they incur to insure their particular levels of resistance and tolerance, and in the intensity of the response they mount against pathogens. Pathogens differ in their speed of spread between hosts, in virulence, and in the intensity of the response they elicit in the hosts. However, to be useful, the model must be validated and its limits and assumptions must be clarified, as will be discussed in the following, with examples mostly related to bovine mastitis.

Validation of the model
Model validation usually takes the form of a comparison between model outputs and real data but this was not possible here because reliable field data are scarce, difficult to measure or imprecisely defined [17,18]. For example, estimates of costs associated with resistance and tolerance are limited in animals, in contrast to plants (see review by [19]). Tolerance has often been measured imprecisely as the overall ability to maintain fitness in the face of infection, irrespective of parasite burden. For example, cows infected with E. coli have been classified as moderate and severe responders according to milk production loss in the nonchallenged quarters [20]. In this case, it is in reality a measure of the combined effects of resistance and tolerance [4]. It was also a deliberate choice to present a generic model because parameters values are different among disease and host populations, so model outputs for one specific disease may not apply to another disease. For example, transmission rates have been estimated at 0.20 to 1.50 per 1000 quarter-days at risk for S. uberis mastitis [21] but at 7 to 50 for S. aureus mastitis [22]. Similarly, killing rates have been estimated at 0.67 to 1.33 × 10 -8 mL/cell per min in milk of cows [23,24] and at 1.64 to 1.76 × 10 -8 mL/neutrophil per min in dermis of rats inoculated with E. coli [13]. Model outputs will also depend on the virulence of the invading pathogens (ω), as exemplified by the different amount of milk loss at the first occurrence of clinical mastitis depending on bacteria species [25], and on the type of performance (e.g., yield, quality of