select_vars combines variable selections obtained from multiple leading sets into a single set, using either a liberal (union) or conservative (progressive intersection) rule.

select_vars(listselect, method = c("conservative", "liberal"))

Arguments

listselect

A list of vectors, each containing names of the predictors selected in the corresponding leading set.

method

Aggregation rule. One of "conservative" or "liberal" (partial matching allowed). Referring to the sets (vectors included in listselect) of selected predictors:

"liberal"

Returns the union of all sets: unique(unlist(listselect)).

"conservative"

Returns the last non-empty intersection when intersecting the first \(i=1,2,\dots\) sets in order. The procedure stops once the running intersection becomes empty and returns the previous (last non-empty) intersection. If the first set is empty, returns character(0). Order of vectors in listselect matters for this method.

Details

The liberal rule favors inclusiveness, while the conservative rule favors stability.

Value

Vector with names of the retained predictors (considered selected in the current iteration of S3VS); if no predictors are retained, character(0)).

Author

Nilotpal Sanyal <nsanyal@utep.edu>, Padmore N. Prempeh <pprempeh@albany.edu>

Examples

listselect <- list(
  c("V1","V2","V23"),
  c("V4","V2","V23"),
  c("V4","V5","V23")
)
select_vars(listselect, method="conservative")
#> [1] "V23"