Glossary

A running glossary of the mathematical, statistical, and R terms used in this course. Add terms here as the material is written; keep definitions short and link to a fuller treatment where one exists.

Linear models with covariates

Design matrix (\(X\)) — the matrix a model formula builds: one row per sample, one column per coefficient. The model is \(\mathbf{y} = X\boldsymbol\beta + \boldsymbol\varepsilon\). See Design matrices for covariates.

Dummy (indicator) variable — a 0/1 column for one level of a factor. A factor with \(k\) levels gets \(k-1\) dummies.

Reference level — the factor level without a dummy column; it is absorbed into the intercept, and every other level’s coefficient is a difference from it. R picks the alphabetically first level unless you use relevel().

Full column rank — the columns of \(X\) are linearly independent, so \(\boldsymbol\beta\) has a unique solution. Linearly dependent columns (the dummy-variable trap, a batch identical to the treatment, an empty cell, more columns than samples) give infinitely many solutions: lm reports NA, DESeq2 says the model matrix is “not full rank”.

Adjustment — adding a covariate as a column of \(X\); the other coefficients are then read “holding that covariate constant”.

Confounder — a variable that affects both the predictor of interest and the outcome. Leaving it out biases the effect. Perfect confounding (e.g. all treated samples in one batch) cannot be fixed in the analysis, only in the experimental design. See Confounding & Simpson’s paradox.

Simpson’s paradox — an effect that has one sign in the pooled data and the opposite sign within every group, because the groups are unevenly mixed.

Mediator / collider — a variable on the causal path from treatment to outcome (mediator), or one caused by both (collider). Adjusting for either can create bias rather than remove it.

Interaction — a product column in \(X\) that lets the effect of one predictor depend on the level of another.

Log2 fold change — the scale on which limma and DESeq2 report coefficients: 1 means doubled, −1 halved. See Many genes at once: limma.

Size factor — how deeply a sample was sequenced, relative to the others; counts are divided by it before samples are compared. DESeq2 uses the median of each sample’s ratios to the typical gene. See Bulk RNA-seq with DESeq2.

Volcano plot — one dot per gene: log2 fold change (x) against \(-\log_{10}\) of the adjusted p-value (y). Genes in the top corners changed a lot and reliably. See Bulk RNA-seq with DESeq2.