Last updated: 2018-05-12
workflowr checks: (Click a bullet for more information)
-
✔ R Markdown file: up-to-date
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
-
✔ Environment: empty
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
-
✔ Seed: set.seed(12345)
The command set.seed(12345)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
-
✔ Session information: recorded
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
-
✔ Repository version: ddf9062
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility. The version displayed above was the version of the Git repository at the time these results were generated.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Ignored files:
Ignored: .DS_Store
Ignored: .Rhistory
Ignored: .Rproj.user/
Ignored: analysis/.DS_Store
Ignored: analysis/BH_robustness_cache/
Ignored: analysis/FDR_Null_cache/
Ignored: analysis/FDR_null_betahat_cache/
Ignored: analysis/Rmosek_cache/
Ignored: analysis/StepDown_cache/
Ignored: analysis/alternative2_cache/
Ignored: analysis/alternative_cache/
Ignored: analysis/ash_gd_cache/
Ignored: analysis/average_cor_gtex_2_cache/
Ignored: analysis/average_cor_gtex_cache/
Ignored: analysis/brca_cache/
Ignored: analysis/cash_deconv_cache/
Ignored: analysis/cash_fdr_1_cache/
Ignored: analysis/cash_fdr_2_cache/
Ignored: analysis/cash_fdr_3_cache/
Ignored: analysis/cash_fdr_4_cache/
Ignored: analysis/cash_fdr_5_cache/
Ignored: analysis/cash_fdr_6_cache/
Ignored: analysis/cash_plots_cache/
Ignored: analysis/cash_sim_1_cache/
Ignored: analysis/cash_sim_2_cache/
Ignored: analysis/cash_sim_3_cache/
Ignored: analysis/cash_sim_4_cache/
Ignored: analysis/cash_sim_5_cache/
Ignored: analysis/cash_sim_6_cache/
Ignored: analysis/cash_sim_7_cache/
Ignored: analysis/correlated_z_2_cache/
Ignored: analysis/correlated_z_3_cache/
Ignored: analysis/correlated_z_cache/
Ignored: analysis/create_null_cache/
Ignored: analysis/cutoff_null_cache/
Ignored: analysis/design_matrix_2_cache/
Ignored: analysis/design_matrix_cache/
Ignored: analysis/diagnostic_ash_cache/
Ignored: analysis/diagnostic_correlated_z_2_cache/
Ignored: analysis/diagnostic_correlated_z_3_cache/
Ignored: analysis/diagnostic_correlated_z_cache/
Ignored: analysis/diagnostic_plot_2_cache/
Ignored: analysis/diagnostic_plot_cache/
Ignored: analysis/efron_leukemia_cache/
Ignored: analysis/fitting_normal_cache/
Ignored: analysis/gaussian_derivatives_2_cache/
Ignored: analysis/gaussian_derivatives_3_cache/
Ignored: analysis/gaussian_derivatives_4_cache/
Ignored: analysis/gaussian_derivatives_5_cache/
Ignored: analysis/gaussian_derivatives_cache/
Ignored: analysis/gd-ash_cache/
Ignored: analysis/gd_delta_cache/
Ignored: analysis/gd_lik_2_cache/
Ignored: analysis/gd_lik_cache/
Ignored: analysis/gd_w_cache/
Ignored: analysis/knockoff_10_cache/
Ignored: analysis/knockoff_2_cache/
Ignored: analysis/knockoff_3_cache/
Ignored: analysis/knockoff_4_cache/
Ignored: analysis/knockoff_5_cache/
Ignored: analysis/knockoff_6_cache/
Ignored: analysis/knockoff_7_cache/
Ignored: analysis/knockoff_8_cache/
Ignored: analysis/knockoff_9_cache/
Ignored: analysis/knockoff_cache/
Ignored: analysis/knockoff_var_cache/
Ignored: analysis/marginal_z_alternative_cache/
Ignored: analysis/marginal_z_cache/
Ignored: analysis/mosek_reg_2_cache/
Ignored: analysis/mosek_reg_4_cache/
Ignored: analysis/mosek_reg_5_cache/
Ignored: analysis/mosek_reg_6_cache/
Ignored: analysis/mosek_reg_cache/
Ignored: analysis/pihat0_null_cache/
Ignored: analysis/plot_diagnostic_cache/
Ignored: analysis/poster_obayes17_cache/
Ignored: analysis/real_data_simulation_2_cache/
Ignored: analysis/real_data_simulation_3_cache/
Ignored: analysis/real_data_simulation_4_cache/
Ignored: analysis/real_data_simulation_5_cache/
Ignored: analysis/real_data_simulation_cache/
Ignored: analysis/rmosek_primal_dual_2_cache/
Ignored: analysis/rmosek_primal_dual_cache/
Ignored: analysis/seqgendiff_cache/
Ignored: analysis/simulated_correlated_null_2_cache/
Ignored: analysis/simulated_correlated_null_3_cache/
Ignored: analysis/simulated_correlated_null_cache/
Ignored: analysis/simulation_real_se_2_cache/
Ignored: analysis/simulation_real_se_cache/
Ignored: analysis/smemo_2_cache/
Ignored: data/LSI/
Ignored: docs/.DS_Store
Ignored: docs/figure/.DS_Store
Ignored: output/fig/
Unstaged changes:
Deleted: analysis/cash_plots_fdp.Rmd
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
Expand here to see past versions:
File
|
Version
|
Author
|
Date
|
Message
|
rmd
|
cc0ab83
|
Lei Sun
|
2018-05-11
|
update
|
html
|
6af9b53
|
LSun
|
2018-04-03
|
Build site.
|
rmd
|
5bce84a
|
LSun
|
2018-04-03
|
wflow_publish(c(“knockoff_6.rmd”, “knockoff_var.rmd”))
|
html
|
389feab
|
LSun
|
2018-02-16
|
Build site.
|
rmd
|
43d68f5
|
Lei Sun
|
2018-02-16
|
small signal plots
|
html
|
af9e532
|
LSun
|
2018-02-16
|
Build site.
|
rmd
|
9c5dc8f
|
Lei Sun
|
2018-02-16
|
small signals
|
rmd
|
e6884e4
|
LSun
|
2018-02-16
|
small signals
|
rmd
|
c1d4306
|
Lei Sun
|
2018-02-16
|
better plots
|
html
|
3151e07
|
LSun
|
2018-02-15
|
Build site.
|
rmd
|
c586cb3
|
LSun
|
2018-02-15
|
wflow_publish(“analysis/knockoff_6.rmd”)
|
rmd
|
c926d34
|
Lei Sun
|
2018-02-14
|
small signals
|
html
|
0033db5
|
LSun
|
2018-02-14
|
Build site.
|
rmd
|
c9c60cc
|
LSun
|
2018-02-14
|
wflow_publish(“analysis/knockoff_6.rmd”)
|
html
|
ab63fb3
|
LSun
|
2018-02-08
|
Build site.
|
rmd
|
1a2b7bf
|
LSun
|
2018-02-08
|
wflow_publish(c(“analysis/knockoff_5.rmd”,
|
rmd
|
a17136e
|
Lei Sun
|
2018-02-07
|
small signals
|
html
|
fe9b5df
|
LSun
|
2018-02-07
|
Build site.
|
rmd
|
7f18ee7
|
LSun
|
2018-02-07
|
wflow_publish(c(“analysis/knockoff_5.rmd”, “analysis/knockoff_6.rmd”))
|
html
|
0d44045
|
LSun
|
2018-02-06
|
Build site.
|
rmd
|
ee112bc
|
LSun
|
2018-02-06
|
wflow_publish(c(“analysis/knockoff_5.rmd”, “analysis/knockoff_6.rmd”,
|
Introduction
In the Knockoff
paper simulations, \(\beta\)’s are either \(0\) or \(A\). Here we are replicating the results, and investigating how well Knockoff
deal with small signals.
In the following simulations, we always have \(n = 3000\), \(p = 1000\), For a certain \(\beta\), \(Y_n \sim N(X_{n\times p}\beta_p, I_n)\). Out of \(p = 1000\) \(\beta_j\)’s, here are three scenarios.
- Scenario 1: \(950\) are 0, and the rest \(50\) are \(A = 3.5\). (replicating a data point on Fig 3 of the
Knockoff
paper)
- Scenario 2: \(850\) are 0, \(50\) are \(A = 3.5\) as large signals, and the rest \(100\) are small signals uniformly from \(0\) to \(3.5\).
- Scenario 3: \(750\) are 0, \(50\) are \(A = 3.5\) as large signals, and the rest \(200\) are small signals uniformly from \(0\) to \(3.5\).
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
n <- 3000
p <- 1000
k <- 50
q <- 0.1
A <- 3.5
Scenario 1: 50 large signals, no small signals, 950 zeroes.
X <- matrix(rnorm(n * p), n , p)
X <- svd(X)$u
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
Expand here to see past versions of unnamed-chunk-5-1.png:
Version
|
Author
|
Date
|
ab63fb3
|
LSun
|
2018-02-08
|
Scenario 2: 50 large signals, 100 small signals, 850 zeroes.
X <- matrix(rnorm(n * p), n , p)
X <- svd(X)$u
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
Expand here to see past versions of unnamed-chunk-10-1.png:
Scenario 3: 50 large signals, 200 small signals, 750 zeroes.
X <- matrix(rnorm(n * p), n , p)
X <- svd(X)$u
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
Expand here to see past versions of unnamed-chunk-15-1.png:
Fix-\(X\) Knockoffs
Orthogonal design
\(X\) has random orthonormal columns
0.0979 |
0.1082 |
0.0863 |
0.7339 |
0.7329 |
0.6939 |
0.7339 |
0.7329 |
0.6939 |
NA |
NA |
NA |
0.0847 |
0.0921 |
0.0795 |
0.3836 |
0.3867 |
0.3691 |
0.7791 |
0.7799 |
0.7555 |
0.1858 |
0.1901 |
0.176 |
0.0756 |
0.0817 |
0.0727 |
0.3294 |
0.3340 |
0.3195 |
0.8116 |
0.8122 |
0.7932 |
0.2088 |
0.2145 |
0.201 |
Expand here to see past versions of unnamed-chunk-18-1.png:
Expand here to see past versions of unnamed-chunk-18-2.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-18-3.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-18-4.png:
Expand here to see past versions of unnamed-chunk-19-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-20-1.png:
Expand here to see past versions of unnamed-chunk-21-1.png:
Expand here to see past versions of unnamed-chunk-22-1.png:
Independent design
\(X_{n \times p}\) has independent columns simulated from \(N(0, 1)\) and then normalized to have \(\|X_j\|_2^2 \equiv 1\).
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
0.0950 |
0.0713 |
0.0483 |
0.4344 |
0.5399 |
0.4135 |
0.4344 |
0.5399 |
0.4135 |
NA |
NA |
NA |
0.0828 |
0.0587 |
0.0397 |
0.2180 |
0.2106 |
0.1584 |
0.4789 |
0.4820 |
0.3699 |
0.0876 |
0.0749 |
0.0527 |
0.0747 |
0.0456 |
0.0325 |
0.1838 |
0.1613 |
0.1243 |
0.5135 |
0.4372 |
0.3432 |
0.1013 |
0.0923 |
0.0696 |
Expand here to see past versions of unnamed-chunk-35-1.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-35-2.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-35-3.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-35-4.png:
Expand here to see past versions of unnamed-chunk-36-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-37-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-38-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-39-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Local correlation design
\(X_{n \times p}\) has correlation \(\Sigma_{ij} = \rho^{|i - j|}\). Each row is independently \(N(0, \Sigma)\) and then normalized to have \(\|X_j\|_2^2 \equiv 1\).
rho <- 0.25
Sigma <- toeplitz(rho^(0 : (p - 1)))
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
X <- X %*% chol(Sigma)
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
X <- X %*% chol(Sigma)
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
X <- matrix(rnorm(n * p), n , p)
X <- t(t(X) / sqrt(colSums(X^2)))
X <- X %*% chol(Sigma)
Xk <- knockoff::create.fixed(X)
Xk <- Xk$Xk
0.0957 |
0.0563 |
0.0344 |
0.3367 |
0.4985 |
0.3484 |
0.3367 |
0.4985 |
0.3484 |
NA |
NA |
NA |
0.0824 |
0.0407 |
0.0249 |
0.1710 |
0.1656 |
0.1070 |
0.3820 |
0.3620 |
0.2348 |
0.0655 |
0.0673 |
0.0431 |
0.0738 |
0.0258 |
0.0170 |
0.1441 |
0.1393 |
0.0988 |
0.4137 |
0.4040 |
0.2893 |
0.0767 |
0.0731 |
0.0511 |
Expand here to see past versions of unnamed-chunk-52-1.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-52-2.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-52-3.png:
Version
|
Author
|
Date
|
af9e532
|
LSun
|
2018-02-16
|
Expand here to see past versions of unnamed-chunk-52-4.png:
Expand here to see past versions of unnamed-chunk-53-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-54-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-55-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Expand here to see past versions of unnamed-chunk-56-1.png:
Version
|
Author
|
Date
|
3151e07
|
LSun
|
2018-02-15
|
Model-\(X\) Knockoffs
Independent design
\(X_{n \times p}\) has independent columns simulated from \(N(0, (1/\sqrt n)^2)\) so they are roughly normalized.
Loaded glmnet 2.0-13
0.0903 |
0.1164 |
0.0935 |
0.4312 |
0.6632 |
0.6124 |
0.4312 |
0.6632 |
0.6124 |
NA |
NA |
NA |
0.0782 |
0.1150 |
0.0929 |
0.2213 |
0.3417 |
0.3161 |
0.4808 |
0.6924 |
0.6526 |
0.0916 |
0.1664 |
0.1478 |
0.0693 |
0.0923 |
0.0806 |
0.1803 |
0.2731 |
0.2573 |
0.5156 |
0.6962 |
0.6718 |
0.0965 |
0.1674 |
0.1536 |
Expand here to see past versions of unnamed-chunk-66-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-66-2.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-66-3.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-66-4.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-67-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-68-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-69-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-70-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Local correlation design
\(X_{n \times p}\) has correlation \(\Sigma_{ij} = \rho^{|i - j|}\). Each row is independently \(N(0, \frac1n\Sigma)\).
rho <- 0.5
Sigma <- toeplitz(rho^(0 : (p - 1)))
Sigma.5 <- chol(Sigma)
Cov.X <- Sigma / n
0.1199 |
0.1230 |
0.0946 |
0.1268 |
0.6036 |
0.5196 |
0.1268 |
0.6036 |
0.5196 |
NA |
NA |
NA |
0.0840 |
0.0971 |
0.0800 |
0.0635 |
0.2759 |
0.2469 |
0.1504 |
0.5784 |
0.5246 |
0.0200 |
0.1246 |
0.1081 |
0.1562 |
0.0671 |
0.0467 |
0.0944 |
0.1253 |
0.0953 |
0.2850 |
0.3564 |
0.2782 |
0.0467 |
0.0676 |
0.0496 |
Expand here to see past versions of unnamed-chunk-80-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-80-2.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-80-3.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-80-4.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-81-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-82-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-83-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
Expand here to see past versions of unnamed-chunk-84-1.png:
Version
|
Author
|
Date
|
6af9b53
|
LSun
|
2018-04-03
|
This reproducible R Markdown
analysis was created with
workflowr 1.0.1