Description Usage Arguments Details Value References Examples
View source: R/knockoff_filter.R
Runs knockoff procedure for Fixed-X from Barber & Candes (2015).
1 2 3 4 5 6 7 8 | knockoff_filter(
X,
y,
method = c("sdp", "equi"),
fdr = 0.2,
plus = TRUE,
randomize = FALSE
)
|
X |
n-by-p design matrix, with n > p. |
y |
response vector of length n. |
method |
either "equi" or "sdp" (default: "sdp"). These are two different methods to generate the p-dimensional s vector, which is used to constuct the knockoff variables. |
fdr |
desired false discovery rate. |
plus |
True for knockoff+ procedure, false for knockoff procedure. |
randomize |
If true, U tilde is a random matrix. If false, U tilde is the second half of the matrix Q, where Q is part of the QR decomposition of an nx2p matrix [U\ 0], where X = UDV^T. default is false. |
This runs the knockoff filter for a given X matrix and y vector. This controls the false discovery rate at a given level.
A list containing:
X |
n-by-p design matrix, rescaled so that ||X_j||^2_2 = 1, and augmented if n < 2p. |
Xk |
n-by-p matrix of knockoff variables. |
y |
vector of observed responses (augmented if n < 2p). |
W |
vector of test statistics. |
thresh |
threshold for variable selection. |
Selected |
list of selected variables. |
Barber and Candes, Controlling the false discovery rate via knockoffs. Ann. Statist. 43 (2015), no. 5, 2055–2085. https://projecteuclid.org/euclid.aos/1438606853
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.