Returns a vector of variable names from an mf_preselect object, based on a cutoff criterion provided.

preselect_vars(x, cutoff = NULL, criterion = NULL)

## Arguments

x Object of class mf_preselect. Numeric. Must be a value between 0 and 1. By default, uses .95 for bootstrapped preselection, and .1 for recursive preselection. Character. Which criterion to use. See Details for more information. By default, uses 'ci' (confidence interval) for bootstrapped preselection, and 'p' (proportion) for recursive preselection.

## Value

Character vector.

## Details

For criterion = 'p', the function evaluates the proportion of replications in which a variable achieved a positive (>0) variable importance. For criterion = 'ci', the function evaluates whether the lower bound of a confidence interval of a variable's importance across replications exceeds zero. The width of the confidence interval is determined by cutoff.

For recursive preselection, any variable not included in a final model is assigned zero importance.

## Examples

if (FALSE) {
data <- get(data(dat.bourassa1996))
data <- escalc(measure = "OR", ai = lh.le, bi = lh.re, ci = rh.le, di= rh.re,
data = data, add = 1/2, to = "all")
data$mage[is.na(data$mage)] <- median(data$mage, na.rm = TRUE) data[c(5:8)] <- lapply(data[c(5:8)], factor) data$yi <- as.numeric(data\$yi)
preselected <- preselect(formula = yi~ selection + investigator + hand_assess + eye_assess +
mage +sex,
data, study = "sample",
whichweights = "unif", num.trees = 300,
replications = 10,
algorithm = "bootstrap")
preselect_vars(preselected)
}