View source: R/knockoff_filter.R
knockoff_filter | R Documentation |
Applies the knockoff filter to select variables while controlling the false discovery rate (FDR) at a specified level.
knockoff_filter(W, fdr = 0.1, offset = 1)
W |
Vector of W statistics from |
fdr |
Target false discovery rate (default: 0.1) |
offset |
Offset parameter for knockoff filter (default: 1) |
Vector of indices of selected variables
# Generate some example W statistics
W <- c(2.1, -0.5, 3.8, -1.2, 4.5, 0.3, -2.1, 1.9)
# Apply knockoff filter
selected <- knockoff_filter(W, fdr = 0.1)
print(selected) # Indices of selected variables
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.