R/select_variables.R

Defines functions select_variables

Documented in select_variables

#' Variable selection
#'
#' Selects variables using the W_j statistics and threshold provided.
#'
#' @param W the set of p test statistics.
#' @param thresh threshold for variable selection.
#'
#' @return A list of selected variables.
#'
#' @export
select_variables <- function(W, thresh) {
  selected <- sort(which(W >= thresh))
  return(selected)
}
svteichman/prelim.knockoffs documentation built on May 28, 2020, 5:14 p.m.