Last updated: 2018-03-02
Code version: 5e91918
The idea in Knockoff
is to generate knockoff variables \(\tilde X\) which 1) keep the relationship of original variables \(X\) 2) are unlike the original variables 3) are null.
\[ \begin{array}{c} \tilde X_i^T\tilde X_i = X_i^TX_i \\ \tilde X_i^T\tilde X_j = X_i^T \tilde X_j = \tilde X_i^T X_j = X_i^TX_j \\ \left|\tilde X_i^T X_i\right|: \text{as small as possible} \end{array} \]
The first two constraints are to control the Type I error, whereas the third is to increase power. Furthermore, there are two methods to make \(\left|\tilde X_i^T X_i\right|\) as small as possible.
\[ \begin{array}{c} Var(X_i) = Var(\tilde X_i) \\ cor(\tilde X_i, \tilde X_j) = cor(X_i, \tilde X_j) = cor(\tilde X_i, X_j) = cor(X_i, X_j) \\ \left|cor(\tilde X_i, X_i)\right|: \text{as small as possible} \end{array} \]
Similarly, the first two constraints are to control the Type I error, whereas the third is to increase power. Furthermore, there are three methods to make \(\left|cor(\tilde X_i, X_i)\right|\) as small as possible.
After centering \(X_j\)’s, the constraints on the Fix-\(X\) design can be seen as the constraints on the sample correlation structure, whereas those on the Model-\(X\) design as on the population correlation structure. It’s no wonder the Model-\(X\) design is believed to be more relaxed, and hence, more powerful.
n <- 3000
p <- 1000
\[ X_{ij} \overset{iid}{\sim} N\left(0, \left(\frac{1}{\sqrt n}\right)^2\right) \]
\[ \begin{array}{c} X_{ij} \sim N\left(0, \left(\frac{1}{\sqrt n}\right)^2\right) \\ cor(X_{ij}, X_{ij'}) \equiv \rho = 0.5 \end{array} \]
NULL
\[ \begin{array}{c} X_{ij} \sim N\left(0, \left(\frac{1}{\sqrt n}\right)^2\right) \\ cor(X_{i1}, X_{i2}) = cor(X_{i3}, X_{i4}) = \cdots = cor(X_{i(p-1)}, X_{ip}) = \rho = 0.99 \end{array} \]
NULL
NULL
\[ \begin{array}{c} \text{each row }X_{i}^T \sim N\left(0, \frac{1}n\Sigma_{p}\right) \\ \Sigma_p = \texttt{cov2cor}(B_{p \times d}B_{d\times p}^T + I)\\ B_{ij} \overset{iid}{\sim} N(0, 1) \end{array} \]
NULL
\[ \begin{array}{c} \text{each row }X_{i}^T \sim N\left(0, \frac{1}n\Sigma_{p}\right) \\ \Sigma_p = \texttt{cov2cor}(\left(B_{p \times d}B_{d\times p}^T + I\right)^{-1})\\ B_{ij} \overset{iid}{\sim} N(0, 1) \end{array} \]
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.3
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Matrix_1.2-12 knockoff_0.3.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 lattice_0.20-35 digest_0.6.14 rprojroot_1.3-2
[5] grid_3.4.3 backports_1.1.2 git2r_0.21.0 magrittr_1.5
[9] evaluate_0.10.1 stringi_1.1.6 rmarkdown_1.8 tools_3.4.3
[13] stringr_1.2.0 yaml_2.1.16 compiler_3.4.3 htmltools_0.3.6
[17] knitr_1.19
This R Markdown site was created with workflowr