TRexDASelector: Dependency-Aware T-Rex Selector (T-Rex+DA)

TRexDASelectorR Documentation

Dependency-Aware T-Rex Selector (T-Rex+DA)

Description

FDR-controlled variable selection for dependent variables.

The penalty of the last step

The dependency-aware relative occurrences of variable j at step t of the T-loop are

\Phi^{DA}_t(j) = \Psi_T(j) \, \Phi_t(j), \qquad \Psi_T(j) = \frac{1}{2 - \min_{j'} |\Phi_T(j) - \Phi_T(j')|}, \qquad t = 1, \dots, T,

where T is the last step of the evaluated path and j' runs over the variables that j is compared with (its group, its window or all other variables). A variable without a group gets \Psi_T(j) = 1/2.

This is a deliberate deviation from the papers below. Read literally, they recompute the penalty at every step, \Psi_t(j) from \Phi_t. The selector takes the penalty of the last step for all steps, with all five methods. The reason is the FDP estimator. It sums over the increments \Phi^{DA}_t(j) - \Phi^{DA}_{t-1}(j) and counts expected false discoveries only while no increment is negative. One penalty per variable keeps the increments non-negative. A penalty per step does not, because the penalty of a variable changes from step to step, and the FDP estimate then becomes too small.

A Monte Carlo comparison of the two constructions (1,000 runs per setting on block, AR(1) and independent designs) supports the choice. With the method "NN" the per-step penalty exceeded a target FDR of 0.1, with 0.15 on an independent design and 0.13 on a block design, where the last-step penalty gave 0.00 and 0.03. No setting had the last-step penalty above the target and the per-step penalty below it. The per-step penalty selected more variables only where its estimate was invalid, and on AR(1) designs the last-step penalty had the higher true positive rate.

The methods "AR1" and "EQUI" used the per-step penalty up to TRexSelector 2.0.1, so their selections can differ slightly from earlier versions. "BT", "NN" and prior groups have always used the penalty of the last step.

The reference threshold

The methods "BT", "NN" and prior groups evaluate every step on the whole grid of correlation thresholds (rho_grid). The L-loop and the T-loop read the FDP estimate at one of them, the reference threshold, which sits at three quarters of the grid: element 0.75 times its length, a half rounded up (element 15 of the default 20). The 1.x versions of the package round a half to the even number and take one element lower for the grid lengths 6, 14, 22, 30 and so on. The selection then searches all cells of stopping time, voting level and threshold, and rho_thresh is the threshold of the cell it takes. The inherited fields fdp_hat_mat, phi_mat and phi_prime therefore hold the values at the reference threshold, while r_mat, v_thresh and the selection belong to rho_thresh. The values at every threshold are in FDP_hat_array_BT, Phi_array_BT and R_array_BT.

FDR limitation of BT, NN and prior groups

At a very high correlation within the groups (about 0.9 and above) and with no independent ("white") predictors, the equiangular solver "TLARS" can exceed the target FDR, because the true signal and its collinear shadows become statistically exchangeable. This is inherent to the method, and it also appears in the 1.x versions of the package. Mitigate with the default bt_selection_mode = "FeasibleOnly" and by preferring a greedy solver ("TOMP") in designs with high correlation.

Greedy solvers and the exchangeable-tie band

A greedy solver ("TOMP", "TOOLS", "TGP", "TACGP", "TMP", "TNCGMP", "TAFS") picks the top candidate of a correlated cluster deterministically, which removes the spread of occurrences within the cluster that the penalty relies on. The selector therefore runs a greedy solver with the exchangeable-tie band at 0.25 when trex_control(exch_tie_alpha = ) is left at its default of -1. A value of 0 switches the band off, and a positive value sets its width. The path solvers ignore the band.

Evidence: a Monte Carlo study on AR(1) designs (1,000 runs per setting, target FDR 0.2, method "AR1", November 2026). At a correlation of 0.9 each of the seven greedy solvers had an FDR of 0.21 to 0.27 without the band and of 0.13 to 0.17 with it, at a true positive rate lower by 0.07 to 0.13. At correlations up to 0.8 the target held without the band as well. The study shows the control up to a correlation of 0.9. At 0.95 the target no longer held (500 runs per setting), with an FDR of up to 0.23 for the path solver "TLARS" and of up to 0.30 for "TOMP" with the band.

Super class

TRexSelector -> TRexDASelector

Active bindings

rho_thresh

Correlation threshold of the selected cell of the calibration grid (BT, NN and prior groups). -2 for AR1 and EQUI and when no cell meets the target.

rho_grid

Grid of correlation thresholds of BT, NN and prior groups: hc_grid_length ascending values. BT and prior groups take them from the merge heights of the dendrogram (1 - height) and end at 1, NN spaces them equally on [0, 1]. Empty for AR1 and EQUI.

da_method_used

The dependency-aware method of the last select(): "BT", "NN", "AR1", "EQUI", or "PRIOR_GROUPS" when prior groups were supplied.

FDP_hat_array_BT

FDP estimates of the methods BT, NN and prior groups: an array with one row per stopping time (T_stop), one column per voting level (voting_grid) and one slice per correlation threshold (rho_grid). Empty for AR1 and EQUI.

Phi_array_BT

Dependency-aware relative occurrences of the methods BT, NN and prior groups: an array with one row per stopping time (T_stop), one column per variable and one slice per correlation threshold (rho_grid). Empty for AR1 and EQUI.

R_array_BT

Numbers of selected variables of the methods BT, NN and prior groups: an array with one row per stopping time that can be selected (T_stop - 1), one column per voting level (voting_grid) and one slice per correlation threshold (rho_grid). Empty for AR1 and EQUI.

cor_coef

Correlation coefficient of the methods AR1 and EQUI: the supplied value, or the estimate from the data when -2 requested it. The other methods do not use it and return the value of the control.

Methods

Public methods

Inherited methods

TRexDASelector$new()

Create a new TRexDASelector object.

Usage
TRexDASelector$new(
  X,
  y,
  tFDR = 0.1,
  seed = -1,
  verbose = TRUE,
  da_control = trex_da_control(),
  control = trex_control()
)
Arguments
X

Feature matrix in memory, or an mmap_matrix, the handle of a memory-mapped file. Both are bound without a copy. The selector standardizes a memory-mapped design in place and restores it, which needs "readwrite" mode. Under scaling_mode = "NONE" it writes nothing and "readonly" mode suffices.

y

Response vector.

tFDR

Target FDR level (default: 0.1).

seed

Random seed. A negative value (default: -1) gives a run that is not reproducible.

verbose

Whether to print progress (default: TRUE).

da_control

A DA control list from trex_da_control() (default: trex_da_control()).

control

A control list from trex_control() (default: trex_control()).


TRexDASelector$select()

Run the Dependency-Aware TRexSelector algorithm. A selector runs once: a second call is an error, see TRexSelector.

Usage
TRexDASelector$select()

TRexDASelector$clone()

The objects of this class are cloneable with this method.

Usage
TRexDASelector$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

References

J. Machkour, M. Muma, and D. P. Palomar, "High-Dimensional False Discovery Rate Control for Dependent Variables," Signal Process., vol. 234, Art. no. 109990, 2025, doi: 10.1016/j.sigpro.2025.109990.

J. Machkour, D. P. Palomar, and M. Muma, "FDR-Controlled Portfolio Optimization for Sparse Financial Index Tracking," in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2025, pp. 1-5, doi: 10.1109/ICASSP49660.2025.10890629.

J. Machkour, M. Muma, and D. P. Palomar, "FDR-Controlled Sparse Index Tracking with Autoregressive Stock Dependency Models," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2024, pp. 2662-2666.

J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.

See Also

Other T-Rex selectors and controls: Gauss_data, TRexBiobankScreeningSelector, TRexGVSSelector, TRexSPCASelector, TRexScreeningSelector, TRexSelector, TRexTikhonovSelector, trex_biobank_control(), trex_build_group_centering_k(), trex_control(), trex_da_control(), trex_default_lambda2_grid(), trex_dummy_distribution(), trex_fdp(), trex_fdp_dense(), trex_gamma_to_k(), trex_get_num_threads(), trex_gvs_control(), trex_gvs_lambda2_power_rule(), trex_normalize_design(), trex_precision(), trex_recall(), trex_screen_control(), trex_spca_control(), trex_tikhonov_control(), trex_tikhonov_lambda2_power_rule(), trex_tpp(), trex_tpp_dense()

Examples


# Dependent variables: an AR(1) process across the columns, five of them active
set.seed(321)
n <- 100
p <- 100
rho <- 0.7
X <- matrix(0, n, p)
X[, 1] <- rnorm(n)
for (j in 2:p) X[, j] <- rho * X[, j - 1] + sqrt(1 - rho^2) * rnorm(n)
true_support <- c(10, 30, 50, 70, 90)
beta <- numeric(p)
beta[true_support] <- 2
y <- as.numeric(X %*% beta + rnorm(n))

sel <- TRexDASelector$new(X, y, tFDR = 0.1, seed = 7, verbose = FALSE,
                          da_control = trex_da_control(da_method = "BT"))
sel$select()
sel$selected_indices



TRexSelector documentation built on Nov. 20, 2026, 5:09 p.m.