Description Usage Arguments Details Value Source Examples
View source: R/create_knockoffs.R
Creates knockoff variables for fixed design matrix.
1 | create_knockoffs(X, y, method = c("sdp", "equi"), randomize = FALSE)
|
X |
n-by-p design matrix, with n > p. |
y |
response vector of length n. This is used in the setting in which n < 2p, to estimate sigma hat and generate additional rows in X and y. |
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. |
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 creates p knockoff variables for a fixed design matrix of size n by p. These knockoffs can be used to provably control the false discovery rate (FDR) for the linear model with iid Gaussian errors.
A list containing:
X |
n-by-p design matrix, rescaled so that ||X_j||^2_2 = 1, and augmented if n < 2p. |
X_knock |
n-by-p matrix of knockoff variables. |
y |
vector of observed responses (augmented if n < 2p). |
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.