get_leadsets identifies, for a specified leading variable, a set of associated predictors, the leading set, based on inter-predictor associations (absolute value of the correlation coefficient).

get_leadsets(x_lead, X, method = c("topk", "fixedthresh", "percthresh"), param)

Arguments

x_lead

Vector with values of the leading variable

X

Predictor matrix. Must contain the leading variable. Can be a base matrix or something as.matrix() can coerce. No missing values are allowed.

method

Rule for constructing, for each leading variable, the set of associated predictors (the "leading set") using inter-predictor association (absolute value of the correlation coefficient); one of c("topk", "fixedthresh", "percthresh"). "topk" keeps the predictors with the largest \(k\) association values; "fixedthresh" keeps predictors whose association is greater than or equal to a specified threshold; "percthresh" keeps predictors whose association is within a given percentage of the best.

param

Tuning parameter for method; If "topk", supply an integer \(k\) (keep the top \(k\)). If "fixedthresh", supply a numeric threshold (keep predictors with association \(\ge\) threshold). If "percthresh", supply a percentage in \((0,100]\) (keep predictors with association \(\ge\) that percent of the highest association).

Value

A character vector containing the names of the predictors.

Author

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

Examples

# Simulate continuous data
set.seed(123)
n <- 100
p <- 150
X <- matrix(rnorm(n * p), n, p)
colnames(X) <- paste0("V", 1:p)
y <- X[,1] + 0.5 * X[,2] + rnorm(n)
leadvars <- get_leadvars_LM(y = y, X = X, method = "topk", param = list(k=2))
get_leadsets(X[,leadvars[1]], X, method = "percthresh", param = list(thresh = 0.2))
#>   [1] "V1"   "V119" "V70"  "V136" "V28"  "V65"  "V134" "V81"  "V61"  "V129"
#>  [11] "V5"   "V115" "V117" "V77"  "V121" "V87"  "V8"   "V141" "V26"  "V108"
#>  [21] "V123" "V101" "V90"  "V135" "V150" "V32"  "V104" "V124" "V35"  "V131"
#>  [31] "V53"  "V44"  "V18"  "V102" "V41"  "V138" "V23"  "V14"  "V3"   "V12" 
#>  [41] "V125" "V24"  "V148" "V33"  "V46"  "V69"  "V114" "V40"  "V109" "V21" 
#>  [51] "V36"  "V130" "V31"  "V79"  "V63"  "V97"  "V45"  "V80"  "V57"  "V143"
#>  [61] "V66"  "V27"  "V126" "V62"  "V34"  "V149" "V15"  "V110" "V113" "V107"
#>  [71] "V128" "V94"  "V25"  "V55"  "V67"  "V146" "V11"  "V100" "V106" "V82" 
#>  [81] "V133" "V16"  "V120" "V29"  "V30"  "V73"  "V139" "V76"  "V6"   "V75" 
#>  [91] "V147" "V89"  "V2"   "V13"  "V86"  "V132" "V99"  "V39"  "V74"  "V49" 
#> [101] "V4"   "V56"  "V103" "V71"  "V111" "V54"  "V59"  "V142" "V91"  "V7"  
#> [111] "V72"  "V84"  "V96"  "V105" "V140" "V116" "V98"  "V83"  "V85"  "V144"
#> [121] "V60"  "V52"  "V122" "V78"  "V37"  "V9"   "V47"  "V118" "V112" "V127"
#> [131] "V58"  "V50"  "V17"  "V42"  "V137" "V20"  "V43"  "V38"  "V51"  "V10" 
#> [141] "V19"  "V68"  "V95"  "V92"  "V88"  "V48"  "V64"  "V93"  "V22"