| TRexDASelector | R Documentation |
FDR-controlled variable selection for dependent variables.
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 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.
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.
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.
TRexSelector -> TRexDASelector
rho_threshCorrelation 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_gridGrid 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_usedThe dependency-aware method of the last select():
"BT", "NN", "AR1", "EQUI", or "PRIOR_GROUPS" when
prior groups were supplied.
FDP_hat_array_BTFDP 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_BTDependency-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_BTNumbers 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_coefCorrelation 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.
TRexDASelector$new()Create a new TRexDASelector object.
TRexDASelector$new( X, y, tFDR = 0.1, seed = -1, verbose = TRUE, da_control = trex_da_control(), control = trex_control() )
XFeature 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.
yResponse vector.
tFDRTarget FDR level (default: 0.1).
seedRandom seed. A negative value (default: -1) gives a run that is not reproducible.
verboseWhether to print progress (default: TRUE).
da_controlA DA control list from trex_da_control() (default:
trex_da_control()).
controlA 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.
TRexDASelector$select()
TRexDASelector$clone()The objects of this class are cloneable with this method.
TRexDASelector$clone(deep = FALSE)
deepWhether to make a deep clone.
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.
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()
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.