A linear model relates a response \(\boldsymbol{y} \in \mathbb{R}^n\) to a design \(\boldsymbol{X} \in \mathbb{R}^{n \times p}\) with \(n\) observations and \(p\) variables,
\[\boldsymbol{y} = \boldsymbol{X} \boldsymbol{\beta} + \boldsymbol{\varepsilon},\]
and in the settings of these vignettes only a few coefficients of \(\boldsymbol{\beta}\) differ from zero. The variables with a non-zero coefficient form the active set \(\mathcal{A}\), the others are null variables. Variable selection returns an estimate \(\widehat{\mathcal{A}}\) of the active set. A null variable in \(\widehat{\mathcal{A}}\) is a false discovery, and an active variable missing from it is a missed discovery. Prediction is a different goal. A model can predict well with many null variables on board, while a selection with false discoveries sends a laboratory [1]–[4] or an investment team [5] after effects that are not there.
Let \(1 \vee a = \max\{1, a\}\). The false discovery rate (FDR) and the true positive rate (TPR) of a selection procedure are
\[\operatorname{FDR} = \mathbb{E}\left[\frac{|\widehat{\mathcal{A}} \setminus \mathcal{A}|} {1 \vee |\widehat{\mathcal{A}}|}\right], \qquad \operatorname{TPR} = \mathbb{E}\left[\frac{|\mathcal{A} \cap \widehat{\mathcal{A}}|} {1 \vee |\mathcal{A}|}\right].\]
The quantities inside the expectations are the false discovery
proportion (FDP) and the true positive proportion (TPP) of one
selection, which trex_fdp() and trex_tpp()
compute when the true support is known, as in a simulation. Benjamini
and Hochberg introduced the FDR as the error rate for multiple
hypothesis testing [6], and Benjamini reviewed its
origins and its first fifteen years in [7]. The older
family-wise error rate asks for no false discovery at all and loses
power as the number of hypotheses grows [8], while a target FDR of 0.1
says that among the selected variables at most ten percent are expected
to be false, whether ten or ten thousand variables were screened. A good
selection procedure keeps the FDR below the target and the TPR as high
as possible.
What a procedure can do depends on the number of variables relative to the number of observations.
With at least as many observations as variables the least squares estimate exists, and every coefficient has a standard error, a test statistic and a p-value. Multiple testing is classical here. The Benjamini–Hochberg procedure on the \(p\) p-values controls the FDR under the assumptions of the model and the dependence conditions of the procedure [6], [9], and the T-Rex selector works here as well.
With more variables than observations the least squares estimate does not exist, because \(\boldsymbol{X}^\top \boldsymbol{X}\) is singular, and the classical p-values go with it. Sparse path methods like the lasso [10] and least angle regression [11], and greedy pursuits like orthogonal matching pursuit, build a model one variable at a time and work for any \(p\), but their stopping rules are tuned for prediction error, so they select without controlling the FDR. The T-Rex selector wraps these solvers in its random experiments and supplies the FDR control they lack, in finite samples and without p-values [12], and for strongly dependent variables the dependency-aware variant T-Rex+DA restores the exchangeability its guarantee rests on [13].
In genomics a design has hundreds of thousands or millions of variables and up to a hundred thousand observations, and the method is the same while the computation is not. Each random experiment enlarges the design by \(L \cdot p\) dummy columns, \(K\) experiments run, and the design itself may not fit in memory. Screen-T-Rex runs the random experiments once as a fast first pass [14], memory-mapped designs keep the data on disk [15], the seeded dummy strategies store no dummy matrices, the greedy solvers are cheaper per step [16], and the thread budgets of the package put the cores to work.
Figure 1: The three regimes in the plane of p and n.
The diagonal \(p = n\) separates low from high dimensionality, and the dashed line \(p = 1000\,n\) marks where the computation starts to dominate, a rule of thumb rather than a theorem. The markers show typical settings. The diagonal, not the size of \(p\) alone, decides the regime. A biobank with twenty thousand participants and a hundred variables is a low-dimensional problem, while a laboratory study with sixty samples and two thousand genes is a high-dimensional one. Large samples with many variables sit near the diagonal and belong to either side, which is why the map replaces the four quadrants of small and large samples with few and many variables.
The selector is defined for any \(n\) and \(p\). One data-generating process with five active variables of coefficient one at \(n = 100\) and three values of \(p\) walks through the regimes, ten trials per regime with ten random experiments each, every trial with its own data and dummies.
set.seed(7)
n <- 100
num_act <- 5
trials <- 10
true_support <- seq_len(num_act)
for (p in c(50, 200, 1000)) {
fdr <- 0
tpr <- 0
for (trial in seq_len(trials)) {
X <- matrix(rnorm(n * p), n, p)
beta <- c(rep(1, num_act), rep(0, p - num_act))
y <- as.vector(X %*% beta + rnorm(n))
ctrl <- trex_control(K = 10)
sel <- TRexSelector$new(X, y, tFDR = 0.1, seed = 6 + trial, verbose = FALSE, control = ctrl)
sel$select()
fdr <- fdr + trex_fdp(sel$selected_indices, true_support) / trials
tpr <- tpr + trex_tpp(sel$selected_indices, true_support) / trials
}
cat(sprintf("p = %4d n/p = %5.2f FDR = %.2f TPR = %.2f\n", p, n / p, fdr, tpr))
}
#> p = 50 n/p = 2.00 FDR = 0.03 TPR = 1.00
#> p = 200 n/p = 0.50 FDR = 0.04 TPR = 0.98
#> p = 1000 n/p = 0.10 FDR = 0.05 TPR = 0.86The estimated FDR stays below the target in every regime, while the TPR falls as \(p\) grows relative to \(n\). Dimensionality costs power, not the control of the false discoveries. In the low-dimensional case the classical route exists next to the selector, and in the two others it does not.