Last updated: 2019-03-13
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(20190115)
The command set.seed(20190115) 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: a6135a0
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: .sos/
Ignored: data/.DS_Store
Ignored: output/.DS_Store
Untracked files:
Untracked: data/random_data_31.rds
Untracked: data/random_data_31_sim_gaussian_35.rds
Untracked: data/random_data_31_sim_gaussian_35_get_sumstats_1.rds
Untracked: data/small_data_46.rds
Untracked: data/small_data_46_sim_gaussian_10.rds
Untracked: data/small_data_46_sim_gaussian_10_get_sumstats_2.rds
Untracked: docs/figure/test.Rmd/
Untracked: figure/
Untracked: output/dscoutProblem475.rds
Untracked: output/dscoutProblem75.rds
Untracked: output/finemap_compare_random_data_null_dscout.rds
Untracked: output/finemap_compare_random_data_signal_dscout.rds
Untracked: output/finemap_compare_small_data_signal_dscout.rds
Untracked: output/finemap_compare_small_data_signal_dscout_RE8.rds
Untracked: output/random_data_100_sim_gaussian_null_1_get_sumstats_1_finemap_1.rds
Untracked: output/random_data_31_35_fit_em.rds
Untracked: output/random_data_76.rds
Untracked: output/random_data_76_sim_gaussian_8.rds
Untracked: output/random_data_76_sim_gaussian_8_get_sumstats_1.rds
Untracked: output/small_data_42_sim_gaussian_36_get_sumstats_2_susie_z_2.rds
Untracked: output/small_data_92_sim_gaussian_30_get_sumstats_2_susie_z_2.rds
Unstaged changes:
Modified: analysis/DontStopProblem.Rmd
Modified: analysis/SuSiEDAP_Power_data31_35.Rmd
Modified: analysis/SusieZPerformance.Rmd
Modified: analysis/SusieZPerformanceRE3.Rmd
Modified: output/dsc_susie_z_v_output.rds
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.
| File | Version | Author | Date | Message |
|---|---|---|---|---|
| html | 4a9450d | zouyuxin | 2019-03-13 | Build site. |
| Rmd | 26d178e | zouyuxin | 2019-03-13 | wflow_publish(“analysis/Investigate.Rmd”) |
| html | db8e65c | zouyuxin | 2019-03-13 | Build site. |
| Rmd | 786e791 | zouyuxin | 2019-03-13 | wflow_publish(“analysis/Investigate.Rmd”) |
| html | 6fd4b75 | zouyuxin | 2019-03-12 | Build site. |
| Rmd | 02cb9f5 | zouyuxin | 2019-03-12 | wflow_publish(“analysis/Investigate.Rmd”) |
| html | fd07945 | zouyuxin | 2019-03-12 | Build site. |
library(susieR)
library(R.utils)
\[ \left(\begin{array} c 2 \\ 2.01 \end{array}\right) \sim N_2(\mathbf{1}\mathbf{1}^{T} \mathbf{0}, \sigma^2 \mathbf{1}\mathbf{1}^{T} + \lambda I) \]
z = c(2, 2.01)
R = matrix(1, 2,2)
Model with var \(\sigma^2(R + \lambda I)\).
sourceDirectory("~/Documents/GitHub/susieR/inst/code/susiez_fix/")
fit_1 = susie_z_general_fix(z, R, lambda = 0.1, restrict = FALSE, estimate_prior_method = 'EM')
The estimated residual variance is
fit_1$sigma2
[1] 1.914548
Model with var \(\sigma^2R + \lambda I\).
sourceDirectory("~/Documents/GitHub/susieR/inst/code/susiez_num/")
fit_2 = susie_z_general_num(z, R, lambda = 0.1, restrict = FALSE, estimate_prior_method = 'EM')
The estimated residual variance is
fit_2$sigma2
[1] 3.7
The model with var \(\sigma^2R + \lambda I\) gives the estimated residual variance close to 4.
We use the model with var \(\sigma^2R + \lambda I\) in the following investigation.
\[ \left(\begin{array} c 1 \\ 1.01 \end{array}\right) \sim N_2(\mathbf{1}\mathbf{1}^{T} \mathbf{0}, \sigma^2 \mathbf{1}\mathbf{1}^{T} + \lambda I) \]
z = c(1, 1.01)
R = matrix(1, 2, 2)
Model with var \(\sigma^2R + \lambda I\). \(\lambda=0.1\)
fit_3 = susie_z_general_num(z, R, verbose=TRUE, lambda = 0.1, restrict = TRUE, estimate_prior_method = 'EM')
[1] "before estimate sigma2 objective:-1.58186763542179"
[1] "after estimate sigma2 objective:-1.57020328695054"
[1] "before estimate sigma2 objective:-1.54628099838458"
[1] "after estimate sigma2 objective:-1.5387674779913"
[1] "before estimate sigma2 objective:-1.5387674779913"
[1] "after estimate sigma2 objective:-1.5387674779913"
susie_plot(fit_3, y = 'PIP')

| Version | Author | Date |
|---|---|---|
| fd07945 | zouyuxin | 2019-03-12 |
There are no significant signal.
\(\lambda=0\)
fit_4 = susie_z_general_num(z, R, verbose=TRUE, lambda = 0, restrict = TRUE, estimate_prior_method = 'EM')
[1] "before estimate sigma2 objective:-2.72916544264994"
[1] "after estimate sigma2 objective:-2.87341252520904"
[1] "before estimate sigma2 objective:-2.97001396947636"
[1] "after estimate sigma2 objective:-2.84286460792038"
[1] "before estimate sigma2 objective:-2.84286460792038"
[1] "after estimate sigma2 objective:-2.84286460792038"
susie_plot(fit_4, y = 'PIP')

z = c(6, 6.01)
R = matrix(1, 2, 2)
Model with var \(\sigma^2R + \lambda I\). \(\lambda=0.1\)
fit_5 = susie_z_general_num(z, R, verbose=TRUE, lambda = 0.1, restrict = TRUE, estimate_prior_method = 'EM')
[1] "before estimate sigma2 objective:-13.7175796354218"
[1] "after estimate sigma2 objective:-13.7175796354218"
[1] "before estimate sigma2 objective:-7.93041128986574"
[1] "after estimate sigma2 objective:-7.93041128986574"
[1] "before estimate sigma2 objective:-4.34247256678977"
[1] "after estimate sigma2 objective:-4.34247256678977"
[1] "before estimate sigma2 objective:-4.05511125597767"
[1] "after estimate sigma2 objective:-4.05511125597767"
[1] "before estimate sigma2 objective:-3.98220036510767"
[1] "after estimate sigma2 objective:-3.98220036510767"
[1] "before estimate sigma2 objective:-3.89332923147985"
[1] "after estimate sigma2 objective:-3.89332923147985"
[1] "before estimate sigma2 objective:-3.78643888763794"
[1] "after estimate sigma2 objective:-3.78643888763794"
[1] "before estimate sigma2 objective:-3.49517397351547"
[1] "after estimate sigma2 objective:-3.49517397351547"
[1] "before estimate sigma2 objective:-3.33717237303734"
[1] "after estimate sigma2 objective:-3.33717237303734"
[1] "before estimate sigma2 objective:-3.32604327581057"
[1] "after estimate sigma2 objective:-3.32604327581057"
[1] "before estimate sigma2 objective:-3.32600070770394"
[1] "after estimate sigma2 objective:-3.32600070770394"
susie_plot(fit_5, y = 'PIP')

| Version | Author | Date |
|---|---|---|
| 4a9450d | zouyuxin | 2019-03-13 |
We find the significant signal.
\(\lambda=0\)
fit_6 = susie_z_general_num(z, R, verbose=TRUE, lambda = 0, restrict = TRUE, estimate_prior_method = 'EM')
[1] "before estimate sigma2 objective:-15.3049756278351"
[1] "after estimate sigma2 objective:-15.3049756278351"
[1] "before estimate sigma2 objective:-8.98627870777684"
[1] "after estimate sigma2 objective:-8.98627870777684"
[1] "before estimate sigma2 objective:-5.45914813136883"
[1] "after estimate sigma2 objective:-5.48144843691391"
[1] "before estimate sigma2 objective:-5.23879173162312"
[1] "after estimate sigma2 objective:-5.26687017353355"
[1] "before estimate sigma2 objective:-5.18885563373841"
[1] "after estimate sigma2 objective:-5.22180034201539"
[1] "before estimate sigma2 objective:-5.12484245159225"
[1] "after estimate sigma2 objective:-5.16552628968922"
[1] "before estimate sigma2 objective:-5.04415120495072"
[1] "after estimate sigma2 objective:-5.09679690706339"
[1] "before estimate sigma2 objective:-4.77880391284597"
[1] "after estimate sigma2 objective:-4.82169386696188"
[1] "before estimate sigma2 objective:-4.49064374164697"
[1] "after estimate sigma2 objective:-4.6440628628735"
[1] "before estimate sigma2 objective:-4.47711780109946"
[1] "after estimate sigma2 objective:-4.6305442049955"
[1] "before estimate sigma2 objective:-4.47704846544923"
[1] "after estimate sigma2 objective:-4.63047487506837"
susie_plot(fit_6, y = 'PIP')

| Version | Author | Date |
|---|---|---|
| db8e65c | zouyuxin | 2019-03-13 |
sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.14.3
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] R.utils_2.7.0 R.oo_1.22.0 R.methodsS3_1.7.1 susieR_0.7.1.0482
loaded via a namespace (and not attached):
[1] workflowr_1.1.1 Rcpp_1.0.0 lattice_0.20-38 digest_0.6.18
[5] rprojroot_1.3-2 grid_3.5.1 backports_1.1.3 git2r_0.24.0
[9] magrittr_1.5 evaluate_0.12 stringi_1.2.4 whisker_0.3-2
[13] Matrix_1.2-15 rmarkdown_1.11 tools_3.5.1 stringr_1.3.1
[17] yaml_2.2.0 compiler_3.5.1 htmltools_0.3.6 knitr_1.20
This reproducible R Markdown analysis was created with workflowr 1.1.1