Quantitative genetics in R
Quantitative genetics is the part of evolutionary biology that deals with traits nobody can assign to a gene: body size, clutch size, flowering date, the things a field biologist actually measures. Its working assumption is that many small effects add up, which makes the machinery statistical rather than genetic, and puts covariances and regression coefficients where alleles would otherwise be. This page collects every tutorial on this site that builds that machinery by hand in base R, from measuring selection in a single season to the exact accounting of evolutionary change and the regression that turns relatedness into a number.
Measuring selection is a regression
Selection acts on phenotypes, so the first task is to describe it without knowing anything about inheritance. The covariance between a trait and relative fitness gives the selection differential, the total change within a generation, and it counts indirect effects: a trait can be under strong apparent selection purely because it correlates with something else that matters. Regressing relative fitness on several traits at once separates the direct part from the borrowed part, and the two quantities answer different questions. The distinction matters in practice because the differential is what a breeder observes and the gradient is what the causal story requires.
Predicting the response needs the genetics back
A within-generation change is not evolution. To get from selection to a response across generations, the phenotypic account has to be scaled by how much of the variation is transmitted, which is what heritability measures and what the breeder’s equation formalises. With several traits the scalar becomes a matrix, and correlated response appears: selecting on one trait moves another that was never under selection, sometimes in the wrong direction. Read that way the genetic covariance matrix is not a nuisance parameter but a description of the constraints a lineage is working under, and its leading axis says where evolution is cheap and where it is expensive.
The exact accounting
The Price equation is the general statement all of the above are special cases of. It splits any change in a population mean into a covariance between fitness and the trait, which is selection, and an expectation of the within-individual change, which is transmission. It assumes nothing about additivity, discrete generations, or a particular genetic architecture, which is why it can be applied at any level: alleles within genomes, individuals within groups, groups within a population. That generality is also its limit, since an identity cannot tell anyone what caused what.
The tutorials
Evolutionary quantitative genetics
- Selection differentials and gradients - measuring selection on a trait, and separating what acts on it from what acts through it.
- The breeder’s equation - scaling observed selection by heritability to predict a response, and where the prediction fails.
- The multivariate breeder’s equation - the genetic covariance matrix, correlated responses, and constraint as a direction.
- Checking a selection analysis - the diagnostics a gradient analysis needs before its coefficients mean anything.
Where this connects
- Evolutionary game theory in R takes the same social interactions and asks about strategies rather than breeding values.
- Causal inference in ecology with R formalises the confounding that turns a selection differential into a misleading gradient.
- Ordination in R uses the eigen decomposition that the genetic covariance matrix is read through.
- Phylogenetic generalised least squares applies the same relatedness matrix across species instead of within a population.