Last updated: 2017-12-21

Code version: 6e42447

Introduction

We are exploring the GD-ASH method to fit \(g\) and the empirical null together.

z <- read.table("../output/z_null_liver_777.txt")
n = ncol(z)
sel <- c(32, 327, 355, 483, 778)
ord <- c(4, 9, 9, 4, 4)
sel.num = length(sel)
beta <- c(
  rep(0, 6000),
  rnorm(3000, 0, 2),
  rnorm(1000, 0, 4)
)
beta <- sample(beta)
sebetahat <- rep(1, 1e4)
betahat.mat <- matrix(0, nrow = sel.num, ncol = n)
for (i in 1 : sel.num) {
  betahat.mat[i, ] = beta + sebetahat * as.numeric(z[sel[i], ])
}
source("../code/gdash.R")

Session information

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.2

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     

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.14      knitr_1.17        magrittr_1.5     
 [4] MASS_7.3-47       doParallel_1.0.11 pscl_1.5.2       
 [7] SQUAREM_2017.10-1 lattice_0.20-35   foreach_1.4.4    
[10] ashr_2.2-2        stringr_1.2.0     tools_3.4.3      
[13] parallel_3.4.3    grid_3.4.3        git2r_0.20.0     
[16] htmltools_0.3.6   iterators_1.0.9   yaml_2.1.16      
[19] rprojroot_1.3-1   digest_0.6.13     Matrix_1.2-12    
[22] codetools_0.2-15  evaluate_0.10.1   rmarkdown_1.8    
[25] stringi_1.1.6     compiler_3.4.3    backports_1.1.2  
[28] truncnorm_1.0-7  

This R Markdown site was created with workflowr