Appendix S2. Reconstructing fitness surfaces when selection is density dependent If selection is density dependent, then the rate of selective mortality can be described as a function of both phenotype (z) and density (N). The change in the number of individuals (and distribution of phenotypes) over time can be described as an outcome of two processes. Specifically, đđđ§,đĄ đđĄ = đđ§,đĄ (đź − đđ§,đ ), Where nz,t is the distribution of phenotypes at time t, α is a baseline rate of change that is independent of both density and phenotype, and fz,N is a function describing the rate of selective mortality. Generally, fz,N can represent the relationship between phenotype, density, and any fitness measure, but in keeping with the main focus of the paper, here we discuss selection as generated through mortality (i.e., fz,N has a negative sign). For analytical tractability, we consider models in which selective mortality depends on initial density (N0). The distribution of phenotypes at time t+1 can therefore be expressed as đđ§,đĄ+1 = đđ§,đĄ đ đź−đđ§,đ0 and total abundance at time t+1 is đđĄ+1 = đ đź ∫ đđ§,đĄ đ −đđ§,đ0 đđ§. (đ§−đ+đđ )2 0 To formulate a specific model for a density-dependent fitness surface, let đđ§,đ0 = . In 2đ 2 this model, the rate of selective mortality is elevated for those phenotypes that are distant from the optimal phenotype (θ), but the location of the optimal phenotype changes with density. b is a coefficient describing the rate at which the fitness peak (i.e., optimal phenotype) changes with density. If we describe nz,t as the product of initial density (N0) and the normal density function (pz), then đđĄ = đ0 đ đź ∫ đđ§ đ (đ§−đ+đđ0 )2 2đ2 − đđ§. Essentially, future abundance is related to the overlap between the distribution of phenotypes (pz) and the density-dependent fitness surface (đđ§ = đ expression yields đđĄ = đ0 đ đ đź √đ2 +đ2 đ − − (đ§−đ+đđ0 )2 2đ2 (đ2 đ2 +2đđ(đ−đ§Ě )+(đ§Ě −đ)2 ) 2(đ2 +đ2 ) ). Integrating the former . (S2.1) Ě ) as This result allows us to express mean fitness (đ đđĄ Ě = =đ đ đ 0 đź đ √đ2 +đ2 đ − (đ2 đ2 +2đđ(đ−đ§Ě )+(đ§Ě −đ)2 ) 2(đ2 +đ2 ) . (S2.2) Ě ) đlnâĄđ Noting that selection gradients can be calculated as đđ§Ě (Lande 1976, 1979), then from equation S2.2 we can generate an expression for selection gradients under this densitydependent model. Specifically, đ˝= Ě đlnâĄđ đđ§Ě = (đ−đ§Ě +đđ0 ) (đ 2 +đ2 ) . (S2.3) If one has multiple estimates of selection gradients, initial density, and the means and variances of phenotypes before selection, then one can use equation S2.3 to estimate parameters of a density-dependent fitness surface. Also note that this general approach could be used to model selection as a function of other environmental variables (including abiotic variables such as temperature, rainfall etc.). It could also be used to model certain types of frequencydependent selection. For example, rate of selective mortality could be modeled as a function of both the individual’s phenotypic value, and the mean phenotypic value for the cohort. An empirical example We know of no studies of fish populations that have both measured selection many times and were conducted in an ecological context in which we would expect selection to be density dependent. However, such data can be found for many other taxa, and the methods outlined above are general. As an illustrative example, we apply our model of densitydependent selection to a long-term study of the relationship between laying date and lifetime reproductive success in a population of mute swans (Cygnus olor). Charmantier et al. (2006) measured selection on laying date for each of 20 breeding years. These authors also recorded information on population abundance, and the means and variances of laying date within each year. For mute swans, an early laying date can be advantageous because early breeders get access to higher quality nesting sites, which leads to greater survival of offspring (Nummi & Saari 2003, Charmantier et al. 2006). For this species, breeding success also depends strongly on density, and nest site limitation is a major mechanism underlying this density dependence (Nummi & Saari 2003). Consequently, selection on laying date may be density dependent because high-quality nest sites fill up more quickly when population density is high. In other words, individuals can get a high quality nest by being slightly earlier than average when population density is low, but to get a nest of similar quality when population density is high, individuals need to nest much earlier than average. This type of density-dependent selection may be described by the “peak shift” model outlined above. For the data reported by Charmantier et al. (2006), mean lifetime reproductive success declined with abundance (Fig S2a), though there was considerable variation about this trend (exponential model of decline: p = 0.05, r2 for a linear model on ln-transformed data 0.19). To examine whether this density-dependent trend might also be reflected in the selection data, we first fit a Gaussian fitness function to the observed variation in selection gradients. This was accomplished by setting b = 0 in equation S2.3 and using nonlinear least squares regression to fit this equation to the selection gradients reported by Charmantier et al. (2006). Note that the reported selection gradients were scaled to a common measure of variance (the average of the within-year variance values). Because residuals from this model indicated a systematic change in selection gradients with density (Fig S2b), we fit the full version of equation S2.3 to the data. This “peak shift” model fit much better than a density-independent, Gaussian surface (F test: F1,17 = 7.483, p = 0.014). Coefficents of S2.3 were θ = 0.731 (0.576 SE), ω = 1.68 (0.679 SE), and b = -0.026 (0.012 SE). The negative value of b indicates that as density increased, the optimal laying date was earlier. The relationship between the observed and predicted values was centered on a 1:1 line (indicating good fit), but the explanatory power of this model was moderate (r2 for the 1:1 line = 0.31). To validate this model further, we can use the estimated fitness surface parameters to calculate mean fitness using equation S2.2. The ‘predicted’ values of mean fitness could then be compared to the empirical estimates of mean fitness observed in the Charmantier et al. (2006) study (unpublished data provided by A. Charmantier). Fitting equation S2.3 to selection gradients does not allow estimation of α, the baseline rate of change that is independent of phenotype and density. We cannot use equation S2.2 to predict absolute fitness, but we can compare values of relative fitness. To calculate relative fitness, both observed and predicted values were divided by their respective means. This procedure will factor out α for the predicted values and it will factor out the average value of α for the observed values. Variation in α among years will still contribute to variation in the observed values of relative mean fitness. The relationship between predicted and observed values of relative mean fitness was centered on a 1:1 line (Fig S3), indicating a direct relationship between predicted and observed mean fitness. The r2 value for the 1:1 line was 0.17. Given that many other factors are known to affect variation in mean reproductive success, these results suggest that even when selection is strongly density dependent, phenotypic variation can still account for substantial variation in lifetime reproductive success and population dynamics. Fig S2. Effects of population density on both mean fitness and strength of selection on laying date. (a) Relationship between population abundance and mean lifetime reproductive success. (b) Relationship between abundance and residuals of selection gradients, which were estimated after accounting for effects of variation in phenotype distributions. Fig S3. Relationship between predicted and observed values of mean lifetime reproductive success for a population of mute swans (Cygnus olor). Mean fitness values for each year were relativized by dividing by the overall mean (i.e., across all 20 years). Predicted mean fitness was calculated from the fitness surface that was reconstructed from observed selection measurements. Line represents a 1:1 relationship.