Search This Blog

Sunday, February 16, 2014

My (1) : 10th Generation Approach - List

10th Generation Approach - List

#################################################
###                             Elastic net + GLM                          ###
#################################################
# save p-values from each test
save(stage2.glmPois.pval, file=paste(npop,"n_stage2_pvalue_glmPois.RData",sep=""))
save(stage2.glmNB.pval, file=paste(npop,"n_stage2_pvalue_glmNB.RData",sep=""))
save(stage2.glmquasiPois.pval, file=paste(npop,"n_stage2_pvalue_glmquasiPois.RData",sep=""))
 
# save detected features from each test
save(stage1.sig, file=paste(npop,"n_stage1_sig.RData",sep=""))
save(stage2.glmPois.sig, file=paste(npop,"n_stage2_sig_glmPois.RData",sep=""))
save(stage2.glmNB.sig, file=paste(npop,"n_stage2_sig_glmNB.RData",sep=""))
save(stage2.glmquasiPois.sig, file=paste(npop,"n_stage2_sig_glmquasiPois.RData",sep=""))

# save results from variable selection
save(stage1.perf, file="varsel_perf.RData")

# save results from GLM-Poisson (after running elastic net)
save(stage2.glmPois.perf, file="varsel_glmPois_perf.RData")
save(stage2.glmquasiPois.perf, file="varsel_glmquasiPois_perf.RData")
save(stage2.glmNB.perf, file="varsel_glmNB_perf.RData")

### The performance of Stage1 (Elastic net) ###

> stage1.perf
[[1]]
[[1]]$npop
[1] 10

[[1]]$perf
       sens   spec   acc   err
simid1 0.19 0.8644 0.797 0.203
simid2 0.23 0.8667 0.803 0.197
simid3 0.03 0.9844 0.889 0.111

[[1]]$perf.avg
     sens      spec       acc       err 
0.1500000 0.9051667 0.8296667 0.1703333 

[[1]]$power
       1.5  2  5  7 10 25 50 75 90 100
simid1  10  0 30 30 10 10 10 40 30  20
simid2  30 20 10 20 10 40 20 40 20  20
simid3  20  0  0  0  0  0  0  0 10   0

[[1]]$power.avg
      1.5         2         5         7        10 
20.000000  6.666667 13.333333 16.666667  6.666667 
       25        50        75        90       100 
16.666667 10.000000 26.666667 20.000000 13.333333 


[[2]]
[[2]]$npop
[1] 25

[[2]]$perf
       sens   spec   acc   err
simid1 0.30 0.8711 0.814 0.186
simid2 0.24 0.9156 0.848 0.152
simid3 0.67 0.5667 0.577 0.423

[[2]]$perf.avg
     sens      spec       acc       err 
0.4033333 0.7844667 0.7463333 0.2536667 

[[2]]$power
       1.5  2  5  7 10 25 50 75  90 100
simid1  10 10 40 50 30 30 60 20  30  20
simid2  20 20 30 30 30 10 20 30  40  10
simid3  30 40 40 60 50 90 90 90 100  80

[[2]]$power.avg
     1.5        2        5        7       10       25 
20.00000 23.33333 36.66667 46.66667 36.66667 43.33333 
      50       75       90      100 
56.66667 46.66667 56.66667 36.66667 


[[3]]
[[3]]$npop
[1] 50

[[3]]$perf
       sens   spec   acc   err
simid1 0.72 0.6989 0.701 0.299
simid2 0.85 0.4811 0.518 0.482
simid3 0.80 0.6144 0.633 0.367

[[3]]$perf.avg
     sens      spec       acc       err 
0.7900000 0.5981333 0.6173333 0.3826667 

[[3]]$power
       1.5  2  5  7 10  25  50  75  90 100
simid1  20 50 70 60 80  80  90  90 100  80
simid2  40 40 90 90 90 100 100 100 100 100
simid3  30 70 70 60 90  90 100 100 100  90

[[3]]$power.avg
      1.5         2         5         7        10 
 30.00000  53.33333  76.66667  70.00000  86.66667 
       25        50        75        90       100 
 90.00000  96.66667  96.66667 100.00000  90.00000
 
 
### The performance of Stage2 (GLM - Neg. Bin.) ###  
> stage2.glmNB.perf
[[1]]
[[1]]$npop
[1] 10

[[1]]$perf
       sens   spec   acc   err
simid1 0.13 0.9822 0.897 0.103
simid2 0.16 0.9756 0.894 0.106
simid3 0.01 0.9956 0.897 0.103

[[1]]$perf.avg
     sens      spec       acc       err 
0.1000000 0.9844667 0.8960000 0.1040000 

[[1]]$power
       1.5  2  5  7 10 25 50 75 90 100
simid1   0  0 20 20  0  0 10 40 30  10
simid2  10 10  0 20 10 30 10 30 20  20
simid3   0  0  0  0  0  0  0  0 10   0

[[1]]$power.avg
      1.5         2         5         7        10 
 3.333333  3.333333  6.666667 13.333333  3.333333 
       25        50        75        90       100 
10.000000  6.666667 23.333333 20.000000 10.000000 


[[2]]
[[2]]$npop
[1] 25

[[2]]$perf
       sens   spec   acc   err
simid1 0.27 0.9367 0.870 0.130
simid2 0.21 0.9622 0.887 0.113
simid3 0.49 0.9089 0.867 0.133

[[2]]$perf.avg
     sens      spec       acc       err 
0.3233333 0.9359333 0.8746667 0.1253333 

[[2]]$power
       1.5  2  5  7 10 25 50 75  90 100
simid1  10 10 40 30 30 30 50 20  30  20
simid2  20 10 30 30 10 10 20 30  40  10
simid3  10 20 20 30 30 50 80 80 100  70

[[2]]$power.avg
     1.5        2        5        7       10       25 
13.33333 13.33333 30.00000 30.00000 23.33333 30.00000 
      50       75       90      100 
50.00000 43.33333 56.66667 33.33333 


[[3]]
[[3]]$npop
[1] 50

[[3]]$perf
       sens   spec   acc   err
simid1 0.53 0.9467 0.905 0.095
simid2 0.60 0.9556 0.920 0.080
simid3 0.54 0.9667 0.924 0.076

[[3]]$perf.avg
      sens       spec        acc        err 
0.55666667 0.95633333 0.91633333 0.08366667 

[[3]]$power
       1.5 2  5  7 10  25  50  75  90 100
simid1   0 0 20 30 50  70  90  90 100  80
simid2   0 0 20 50 30 100 100 100 100 100
simid3   0 0 30 20 30  80 100 100 100  80

[[3]]$power.avg
      1.5         2         5         7        10 
  0.00000   0.00000  23.33333  33.33333  36.66667 
       25        50        75        90       100 
 83.33333  96.66667  96.66667 100.00000  86.66667 
 
 
###########################################################
###                                2. GLM-Poisson Model                                   ###
###########################################################
# save p-values from GLM-Pois test
save(glmPois.pval, file=paste(npop,"n_pvalue_glmPois.RData",sep=""))

# save detected features from GLM-Pois test
save(glmPois.sig, file=paste(npop,"n_sig_glmPois.RData",sep=""))


> save(glmPois.perf, file="glmPois_perf.RData")
> glmPois.perf

###########################################################
###                                3. GLM-NB Model                                          ###
###########################################################
# save p-values from GLM-NB test
save(glmNB.pval, file=paste(npop,"n_pvalue_glmNB.RData",sep=""))
 
# save detected features from GLM-NB test
save(glmNB.sig, file=paste(npop,"n_stage2_sig_glmNB.RData",sep=""))



> save(glmNB.perf, file="glmNB_perf.RData")
> glmNB.perf
 
###########################################################
###                           4. GLM-Quasi Poisson Model                               ###
###########################################################
# save p-values from GLM-Quasi Poisson test
save(glmquasiPois.pval, file=paste(npop,"n_pvalue_glmquasiPois.RData",sep=""))
 
# save detected features from GLM-Quasi Poisson test
save(glmquasiPois.sig, file=paste(npop,"n_sig_glmquasiPois.RData",sep=""))


> save(glmquasiPois.perf, file="glmPois_perf.RData")
> glmquasiPois.perf


##############################################################
###                   5. metagenomeSeq (using CSS Normalization)                  ###
##############################################################
# save p-values
save(metagenomeSeqCSS.pval, file=paste(npop,"n_pvalue_metagenomeSeqCSS.RData",sep=""))
 
# save detected features
save(metagenomeSeqCSS.sig, file=paste(npop,"n_sig_metagenomeSeqCSS.RData",sep=""))


> save(metagenomeSeqCSS.perf, file="metagenomeSeqCSS_perf.RData")
> metagenomeSeqCSS.perf



No comments:

Post a Comment