R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("pamr-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('pamr') > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "pamr.adaptthresh" > > ### * pamr.adaptthresh > > flush(stderr()); flush(stdout()) > > ### Name: pamr.adaptthresh > ### Title: A function to adaptive choose threshold scales, for use in > ### pamr.train > ### Aliases: pamr.adaptthresh > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> new.scales <- pamr.adaptthresh(mytrain) Initial errors: 1.26667 1.36667 0.00000 0.96667 Roc 4.67797 Update 1 1234567891011 Errors 4.45455 3.81818 0.00000 3.72727 Roc 11.96924 Update 2 1234567891011 Errors 3.81818 3.81818 0.00000 3.72727 Roc 12.28073 Update 3 1234567891011 Errors 4.72727 3.90909 0.00000 4.63636 Roc 13.07318 Update 4 1234567891011 Errors 4.18182 3.90909 0.00000 4.63636 Roc 13.56088 Update 5 1234567891011 Errors 4.18182 3.90909 0.00000 4.00000 Roc 13.03134 Update 6 1234567891011 Errors 4.18182 4.00000 0.00000 4.81818 Roc 13.12217 Update 7 1234567891011 Errors 4.18182 4.00000 0.00000 4.00000 Roc 12.35106 Update 8 1234567891011 Errors 4.18182 4.00000 0.00000 4.81818 Roc 12.48781 Update 9 1234567891011 Errors 4.18182 4.00000 0.00000 4.00000 Roc 12.01602 Update 10 1234567891011 Errors 4.18182 4.00000 0.00000 4.81818 Roc 12.48781 > > > mytrain2 <- pamr.train(mydata, threshold.scale=new.scales) 123456789101112131415161718192021222324252627282930> > myresults2 <- pamr.cv(mytrain2, mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > > > > > cleanEx(); ..nameEx <- "pamr.batchadjust" > > ### * pamr.batchadjust > > flush(stderr()); flush(stdout()) > > ### Name: pamr.batchadjust > ### Title: A function to mean-adjust microarray data by batches > ### Aliases: pamr.batchadjust > > > ### ** Examples > > set.seed(120) > #generate some data > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > batchlabels <- sample(c(1:5),size=20,replace=TRUE) > mydata <- list(x=x,y=factor(y),batchlabels=factor(batchlabels)) > > mydata2 <- pamr.batchadjust(mydata) > > > > cleanEx(); ..nameEx <- "pamr.confusion" > > ### * pamr.confusion > > flush(stderr()); flush(stdout()) > > ### Name: pamr.confusion > ### Title: A function giving a table of true versus predicted values, from > ### a nearest shrunken centroid fit. > ### Aliases: pamr.confusion > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain,mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > pamr.confusion(mytrain, threshold=2) 1 2 3 4 Class Error rate 1 0 0 5 0 1 2 0 0 4 0 1 3 0 0 6 0 0 4 0 0 5 0 1 Overall error rate= 0.609 > pamr.confusion(mycv, threshold=2) 1 2 3 4 Class Error rate 1 0 0 5 0 1.0000000 2 0 0 4 0 1.0000000 3 0 0 5 1 0.1666667 4 0 0 3 2 0.6000000 Overall error rate= 0.571 > > > > > cleanEx(); ..nameEx <- "pamr.confusion.survival" > > ### * pamr.confusion.survival > > flush(stderr()); flush(stdout()) > > ### Name: pamr.confusion.survival > ### Title: Compute confusin matrix from pamr survival fit > ### Aliases: pamr.confusion.survival > > > ### ** Examples > > > > > cleanEx(); ..nameEx <- "pamr.cv" > > ### * pamr.cv > > flush(stderr()); flush(stdout()) > > ### Name: pamr.cv > ### Title: A function to cross-validate the nearest shrunken centroid > ### classifier > ### Aliases: pamr.cv > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > > mydata <- list(x=x,y=factor(y), geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep=""),) > > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain,mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > > > > cleanEx(); ..nameEx <- "pamr.geneplot" > > ### * pamr.geneplot > > flush(stderr()); flush(stdout()) > > ### Name: pamr.geneplot > ### Title: A function to plot the genes that surive the thresholding from > ### the nearest shrunken centroid classifier > ### Aliases: pamr.geneplot > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> pamr.geneplot(mytrain, mydata, threshold=1.6) > > > > > cleanEx(); ..nameEx <- "pamr.listgenes" > > ### * pamr.listgenes > > flush(stderr()); flush(stdout()) > > ### Name: pamr.listgenes > ### Title: A function to list the genes that survive the thresholding, from > ### the nearest shrunken centroid classifier > ### Aliases: pamr.listgenes > > > ### ** Examples > > > #generate some data > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > > mydata <- list(x=x,y=factor(y), geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep=""),) > > #train classifier > mytrain<- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> > pamr.listgenes(mytrain, mydata, threshold=1.6) id 1-score 2-score 3-score 4-score [1,] 986 0 0 0 -0.1989 [2,] 833 0 0 -0.1199 0 [3,] 525 0 0 -0.0923 0 [4,] 365 0 0 0 0.0901 [5,] 85 0 0 0.0812 0 [6,] 122 -0.0546 0 0 0 [7,] 839 0 0 0 -0.054 [8,] 655 0 0.0242 0 0 [9,] 491 0 0.0201 0 0 [10,] 531 -0.016 0 0 0 [11,] 514 0 0 0 -0.0145 [12,] 136 0 0.0139 0 0 [13,] 631 0 0 -0.0038 0 [14,] 626 -0.0027 0 0 0 [15,] 745 -0.0025 0 0 0 > > > > > cleanEx(); ..nameEx <- "pamr.makeclasses" > > ### * pamr.makeclasses > > flush(stderr()); flush(stdout()) > > ### Name: pamr.makeclasses > ### Title: A function to interactively define classes from a clustering > ### tree > ### Aliases: pamr.makeclasses > > > ### ** Examples > > set.seed(120) > #generate some data > x <- matrix(rnorm(1000*40),ncol=40) > y <- sample(c(1:4),size=40,replace=TRUE) > batchlabels <- sample(c(1:5),size=40,replace=TRUE) > > mydata <- list(x=x,y=factor(y),batchlabels=factor(batchlabels), geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep=""),) > > # mydata$newy <- pamr.makeclasses(mydata) Run this and define some new classes > > train <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> > > > cleanEx(); ..nameEx <- "pamr.menu" > > ### * pamr.menu > > flush(stderr()); flush(stdout()) > > ### Name: pamr.menu > ### Title: A function that interactively leads the user through a PAM > ### analysis > ### Aliases: pamr.menu > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > # pamr.menu(mydata) > > > > cleanEx(); ..nameEx <- "pamr.plotcen" > > ### * pamr.plotcen > > flush(stderr()); flush(stdout()) > > ### Name: pamr.plotcen > ### Title: A function to plot the shrunken class centroids, from the > ### nearest shrunken centroid classifier > ### Aliases: pamr.plotcen > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y,genenames=as.character(1:1000)) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain,mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > pamr.plotcen(mytrain, mydata,threshold=1.6) > > > > > cleanEx(); ..nameEx <- "pamr.plotcv" > > ### * pamr.plotcv > > flush(stderr()); flush(stdout()) > > ### Name: pamr.plotcv > ### Title: A function to plot the cross-validated error curves from the > ### nearest shrunken centroid classifier > ### Aliases: pamr.plotcv > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain, mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > pamr.plotcv(mycv) > > > > cleanEx(); ..nameEx <- "pamr.plotcvprob" > > ### * pamr.plotcvprob > > flush(stderr()); flush(stdout()) > > ### Name: pamr.plotcvprob > ### Title: A function to plot the cross-validated sample probabilities from > ### the nearest shrunken centroid classifier > ### Aliases: pamr.plotcvprob > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain,mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > pamr.plotcvprob(mycv,mydata,threshold=1.6) > > > > > > cleanEx(); ..nameEx <- "pamr.plotstrata" > > ### * pamr.plotstrata > > flush(stderr()); flush(stdout()) > > ### Name: pamr.plotstrata > ### Title: A function to plot the survival curves in each Kaplan Meier > ### stratum > ### Aliases: pamr.plotstrata > > > ### ** Examples > > > gendata<-function(n=100, p=2000){ + tim <- 3*abs(rnorm(n)) + u<-runif(n,min(tim),max(tim)) + y<-pmin(tim,u) + ic<-1*(timm] <- x[1:100, tim>m]+3 + return(list(x=x,y=y,ic=ic)) + } > > # generate training data; 2000 genes, 100 samples > > junk<-gendata(n=100) > y<-junk$y > ic<-junk$ic > x<-junk$x > d <- list(x=x,survival.time=y, censoring.status=ic, + geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep= + ""),) > > # train model > a3<- pamr.train(d, ngroup.survival=2) Loading required package: survival Loading required package: splines 123456789101112131415161718192021222324252627282930> > pamr.plotstrata(a3, d$survival.time, d$censoring.status) Warning in fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. > > > > cleanEx(); ..nameEx <- "pamr.plotsurvival" > > ### * pamr.plotsurvival > > flush(stderr()); flush(stdout()) > > ### Name: pamr.plotsurvival > ### Title: A function to plots Kaplan-Meier curves stratified by a group > ### variable > ### Aliases: pamr.plotsurvival > > > ### ** Examples > > > gendata<-function(n=100, p=2000){ + tim <- 3*abs(rnorm(n)) + u<-runif(n,min(tim),max(tim)) + y<-pmin(tim,u) + ic<-1*(timm] <- x[1:100, tim>m]+3 + return(list(x=x,y=y,ic=ic)) + } > > # generate training data; 2000 genes, 100 samples > > junk<-gendata(n=100) > y<-junk$y > ic<-junk$ic > x<-junk$x > d <- list(x=x,survival.time=y, censoring.status=ic, + geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep= + ""),) > > # train model > a3<- pamr.train(d, ngroup.survival=2) Loading required package: survival Loading required package: splines 123456789101112131415161718192021222324252627282930> > #make class predictions > > yhat <- pamr.predict(a3,d$x, threshold=1.0) > > pamr.plotsurvival(yhat, d$survival.time, d$censoring.status) Warning in fitter(X, Y, strats, offset, init, control, weights = weights, : Loglik converged before variable 1 ; beta may be infinite. NULL > > > > > cleanEx(); ..nameEx <- "pamr.predict" > > ### * pamr.predict > > flush(stderr()); flush(stdout()) > > ### Name: pamr.predict > ### Title: A function giving prediction information, from a nearest > ### shrunken centroid fit. > ### Aliases: pamr.predict > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> mycv <- pamr.cv(mytrain,mydata) 1234Fold 1 :123456789101112131415161718192021222324252627282930 Fold 2 :123456789101112131415161718192021222324252627282930 Fold 3 :123456789101112131415161718192021222324252627282930 Fold 4 :123456789101112131415161718192021222324252627282930 > pamr.predict(mytrain, mydata$x , threshold=1) [1] 4 3 4 2 1 2 3 1 3 3 4 1 3 4 2 3 4 1 2 1 Levels: 1 2 3 4 > > > > > cleanEx(); ..nameEx <- "pamr.predictmany" > > ### * pamr.predictmany > > flush(stderr()); flush(stdout()) > > ### Name: pamr.predictmany > ### Title: A function giving prediction information for many threshold > ### values, from a nearest shrunken centroid fit. > ### Aliases: pamr.predictmany > > > ### ** Examples > > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=y) > mytrain <- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> > pamr.predictmany(mytrain, mydata$x) $prob , , 1 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 3.928687e-23 1.000000e+00 5.039684e-23 7.226779e-23 1.821933e-23 2.501227e-26 1.636571e-24 1.409758e-27 2.018616e-27 4.007828e-25 8.528453e-21 9.952654e-23 1.000000e+00 1.000000e+00 1.241953e-21 1.000000e+00 1.270489e-25 2.050196e-20 3.258717e-24 1.000000e+00 [2,] 1.763113e-22 8.443764e-28 1.927351e-20 1.525787e-23 1.000000e+00 1.704072e-22 1.000000e+00 7.247348e-24 1.525271e-25 8.266012e-27 1.000000e+00 3.947007e-24 1.000000e+00 3.454372e-21 2.318528e-20 2.942162e-19 5.518796e-26 4.526350e-24 1.000000e+00 3.246940e-25 [3,] 5.586542e-23 1.018447e-18 1.822225e-25 1.771869e-24 2.264715e-23 3.736550e-28 2.815573e-24 3.410666e-23 1.000000e+00 1.000000e+00 1.094686e-21 1.000000e+00 9.000556e-21 2.238324e-24 2.626275e-22 1.000000e+00 1.218701e-19 1.000000e+00 7.533324e-28 4.348842e-23 [4,] 1.918978e-26 1.000000e+00 1.000000e+00 2.329107e-22 1.000000e+00 1.000000e+00 2.451647e-24 1.018959e-25 5.333301e-22 3.298893e-27 3.348249e-26 1.931732e-20 5.361742e-22 1.000000e+00 6.355832e-22 5.621481e-25 5.378967e-22 5.014830e-22 1.210473e-20 9.991222e-24 , , 2 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 1.157531e-20 1.000000e+00 3.272353e-20 7.185613e-20 6.892519e-21 1.585753e-23 2.935506e-21 7.532607e-24 1.074921e-23 4.277460e-22 6.303645e-19 2.322100e-20 1.000000e+00 1.000000e+00 1.655592e-19 1.000000e+00 1.321107e-22 5.454379e-18 2.273560e-21 1.000000e+00 [2,] 5.484695e-20 6.324351e-25 2.745869e-18 8.473846e-21 1.000000e+00 8.858980e-20 1.000000e+00 6.980204e-21 2.919424e-22 1.302421e-23 1.000000e+00 1.289647e-21 1.000000e+00 6.046701e-19 1.463320e-18 3.406117e-17 2.851427e-23 2.408976e-21 1.000000e+00 1.833700e-22 [3,] 3.250937e-20 1.137218e-16 9.389055e-23 4.935168e-22 3.588531e-21 7.711914e-25 2.844221e-21 1.129278e-20 1.000000e+00 1.000000e+00 2.551327e-19 1.000000e+00 7.603437e-19 5.018979e-22 2.633869e-20 1.000000e+00 2.517385e-17 1.000000e+00 6.374038e-25 7.086747e-21 [4,] 9.021248e-24 1.000000e+00 1.000000e+00 1.392294e-19 1.000000e+00 1.000000e+00 2.695833e-21 1.732410e-22 4.660044e-19 4.871079e-24 1.156524e-23 2.217227e-18 1.292154e-19 1.000000e+00 7.720490e-20 1.286515e-22 1.121183e-19 1.810768e-19 2.201735e-18 3.872325e-21 , , 3 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 3.348621e-18 1.000000e+00 1.453325e-17 4.107891e-17 2.574407e-18 9.869554e-21 3.494841e-18 2.040973e-20 3.341298e-20 3.384193e-19 4.844219e-17 5.733368e-18 1.000000e+00 1.000000e+00 2.738270e-17 1.000000e+00 1.159269e-19 1.280894e-15 9.980382e-19 1.000000e+00 [2,] 1.356817e-17 4.772977e-22 3.153803e-16 3.322427e-18 1.000000e+00 2.880311e-17 1.000000e+00 4.462750e-18 4.338824e-19 1.262970e-20 1.000000e+00 4.932531e-19 1.000000e+00 9.005897e-17 1.054892e-16 3.043817e-15 1.544336e-20 1.102650e-18 1.000000e+00 9.000047e-20 [3,] 1.314758e-17 1.112074e-14 4.418190e-20 1.591062e-19 7.024233e-19 9.718166e-22 1.940644e-18 2.925546e-18 1.000000e+00 1.000000e+00 5.452263e-17 1.000000e+00 7.592732e-17 1.496001e-19 3.488757e-18 1.000000e+00 3.988046e-15 1.000000e+00 5.211041e-22 1.679016e-18 [4,] 5.912852e-21 1.000000e+00 1.000000e+00 7.030121e-17 1.000000e+00 1.000000e+00 1.811779e-18 1.978367e-19 2.083219e-16 5.928230e-21 5.350912e-21 2.483218e-16 2.677742e-17 1.000000e+00 1.124429e-17 3.385622e-20 1.890936e-17 5.427529e-17 3.920977e-16 1.280659e-18 , , 4 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 1.128258e-15 1.000000e+00 4.693073e-15 1.358069e-14 8.756788e-16 5.027122e-18 2.240567e-15 2.390099e-17 6.005373e-17 2.077451e-16 4.825981e-15 1.049766e-15 1.000000e+00 1.000000e+00 4.986229e-15 1.000000e+00 6.220201e-17 2.649780e-13 3.328781e-16 1.000000e+00 [2,] 3.121305e-15 2.498469e-19 3.098913e-14 8.086024e-16 1.000000e+00 6.884025e-15 1.000000e+00 1.664725e-15 2.619003e-16 7.420603e-18 1.000000e+00 1.455437e-16 1.000000e+00 1.018635e-14 5.699890e-15 2.355799e-13 6.264829e-18 3.530712e-16 1.000000e+00 2.971163e-17 [3,] 3.540209e-15 9.254815e-13 1.622552e-17 4.471949e-17 1.250002e-16 8.423266e-19 9.141430e-16 5.379091e-16 1.000000e+00 1.000000e+00 9.653429e-15 1.000000e+00 7.557969e-15 5.646017e-17 4.603056e-16 1.000000e+00 4.928856e-13 1.000000e+00 4.924252e-19 3.547276e-16 [4,] 3.374582e-18 1.000000e+00 1.000000e+00 2.406082e-14 1.000000e+00 1.000000e+00 8.742088e-16 1.312503e-16 6.237776e-14 5.332236e-18 2.453845e-18 3.065647e-14 5.510496e-15 1.000000e+00 1.790891e-15 7.853954e-18 3.335567e-15 1.170729e-14 5.339267e-14 3.795283e-16 , , 5 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 2.911273e-13 1.000000e+00 7.295752e-13 2.791635e-12 1.861838e-13 1.947812e-15 7.047845e-13 1.159634e-14 4.690054e-14 6.584139e-14 4.139198e-13 1.425818e-13 1.000000e+00 1.000000e+00 6.823070e-13 1.000000e+00 2.272722e-14 2.778223e-11 8.309123e-14 1.000000e+00 [2,] 4.398367e-13 1.099502e-16 2.468638e-12 1.601001e-13 1.000000e+00 1.139316e-12 1.000000e+00 4.363615e-13 7.934767e-14 2.958860e-15 1.000000e+00 3.982436e-14 1.000000e+00 1.085346e-12 2.823189e-13 1.176916e-11 2.129996e-15 8.606664e-14 1.000000e+00 7.603893e-15 [3,] 6.772712e-13 4.810403e-11 4.713385e-15 8.416580e-15 1.968184e-14 4.665716e-16 2.174609e-13 7.615567e-14 1.000000e+00 1.000000e+00 1.183429e-12 1.000000e+00 6.980602e-13 1.329578e-14 5.422357e-14 1.000000e+00 3.730858e-11 1.000000e+00 2.374378e-16 5.430616e-14 [4,] 1.714759e-15 1.000000e+00 1.000000e+00 4.803910e-12 1.000000e+00 1.000000e+00 2.880116e-13 5.471405e-14 1.143814e-11 2.884049e-15 8.735213e-16 3.434442e-12 8.409037e-13 1.000000e+00 2.550191e-13 1.685937e-15 4.488469e-13 1.943543e-12 7.886149e-12 6.832426e-14 , , 6 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 4.437281e-11 1.000000e+00 7.195737e-11 3.484348e-10 2.931456e-11 4.705729e-13 9.608046e-11 3.317630e-12 1.734092e-11 1.270190e-11 2.816647e-11 1.270833e-11 1.000000e+00 1.000000e+00 6.767255e-11 1.000000e+00 4.594055e-12 1.694423e-09 1.400294e-11 1.000000e+00 [2,] 3.578945e-11 3.162195e-14 1.435086e-10 2.097392e-11 1.000000e+00 9.584382e-11 1.000000e+00 6.257230e-11 1.430119e-11 8.114980e-13 1.000000e+00 6.411276e-12 1.000000e+00 8.460936e-11 1.328679e-11 3.539116e-10 3.688550e-13 1.179246e-11 1.000000e+00 1.331323e-12 [3,] 8.116439e-11 1.534515e-09 9.151205e-13 1.035969e-12 2.500896e-12 1.504602e-13 3.172235e-11 6.976662e-12 1.000000e+00 1.000000e+00 9.366948e-11 1.000000e+00 5.641314e-11 2.359971e-12 5.296156e-12 1.000000e+00 1.606435e-09 1.000000e+00 8.695698e-14 5.631198e-12 [4,] 6.007157e-13 1.000000e+00 1.000000e+00 5.618342e-10 1.000000e+00 1.000000e+00 4.616614e-11 1.212078e-11 1.237746e-09 8.880816e-13 2.273741e-13 2.599832e-10 7.768292e-11 1.000000e+00 3.222458e-11 3.296986e-13 4.761965e-11 1.909626e-10 7.832356e-10 9.510525e-12 , , 7 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 3.098495e-09 1.000000e+00 4.182929e-09 2.480226e-08 2.319986e-09 6.176710e-11 7.570321e-09 4.845689e-10 2.699521e-09 1.601956e-09 1.432513e-09 8.793491e-10 9.999999e-01 1.000000e+00 4.111831e-09 1.000000e+00 5.590542e-10 6.820003e-08 1.332026e-09 1.000000e+00 [2,] 1.785489e-09 6.233412e-12 5.646027e-09 1.956412e-09 1.000000e+00 4.357778e-09 1.000000e+00 4.474870e-09 1.587124e-09 1.417758e-10 1.000000e+00 7.024966e-10 1.000000e+00 5.412293e-09 6.301348e-10 7.268070e-09 4.952647e-11 9.807258e-10 1.000000e+00 1.805420e-10 [3,] 6.146661e-09 3.274929e-08 9.824654e-11 1.197618e-10 2.246891e-10 3.594480e-11 2.284894e-09 3.991208e-10 1.000000e+00 1.000000e+00 6.072322e-09 9.999999e-01 2.820409e-09 3.438368e-10 3.755356e-10 1.000000e+00 4.140110e-08 1.000000e+00 2.313553e-11 3.868201e-10 [4,] 1.200631e-10 1.000000e+00 1.000000e+00 3.807019e-08 1.000000e+00 1.000000e+00 4.453390e-09 1.274432e-09 6.796439e-08 1.242211e-10 3.001316e-11 1.200606e-08 3.685536e-09 9.999999e-01 2.399691e-09 3.815543e-11 3.379650e-09 9.612273e-09 3.752878e-08 7.869519e-10 , , 8 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 1.455173e-07 9.999996e-01 1.482403e-07 7.772277e-07 9.424911e-08 4.551716e-09 3.028236e-07 3.777299e-08 1.477394e-07 8.529333e-08 4.897570e-08 3.873661e-08 9.999984e-01 9.999990e-01 1.288401e-07 9.999998e-01 3.711624e-08 1.404029e-06 5.833228e-08 9.999997e-01 [2,] 7.365575e-08 7.567476e-10 1.409019e-07 1.126533e-07 1.000000e+00 1.581121e-07 9.999999e-01 1.647698e-07 8.875581e-08 1.376386e-08 9.999996e-01 4.868934e-08 9.999997e-01 2.154401e-07 2.029300e-08 1.534692e-07 4.146152e-09 4.133295e-08 9.999996e-01 1.249291e-08 [3,] 2.449715e-07 5.448938e-07 5.890381e-09 7.995841e-09 1.110014e-08 4.774188e-09 1.037665e-07 1.306730e-08 1.000000e+00 1.000000e+00 2.521897e-07 9.999986e-01 8.720596e-08 2.953190e-08 1.670035e-08 9.999995e-01 7.379439e-07 9.999999e-01 2.844355e-09 1.692803e-08 [4,] 1.227474e-08 9.999992e-01 9.999994e-01 1.343347e-06 9.999998e-01 1.000000e+00 2.543823e-07 7.648889e-08 1.685536e-06 9.201704e-09 2.253739e-09 3.768962e-07 1.408960e-07 9.999959e-01 1.082987e-07 2.894497e-09 1.496486e-07 3.432663e-07 1.024915e-06 3.704403e-08 , , 9 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 4.019563e-06 9.999903e-01 3.272063e-06 1.256737e-05 1.939748e-06 1.767708e-07 7.265341e-06 1.492745e-06 3.575150e-06 1.948902e-06 1.090737e-06 1.103118e-06 9.999768e-01 9.999824e-01 2.470668e-06 9.999947e-01 1.344834e-06 1.842189e-05 1.412615e-06 9.999936e-01 [2,] 1.945879e-06 5.039878e-08 2.175053e-06 4.022810e-06 9.999983e-01 3.955629e-06 9.999981e-01 3.322611e-06 2.485431e-06 7.058156e-07 9.999917e-01 1.697738e-06 9.999936e-01 5.237176e-06 4.930950e-07 2.439683e-06 1.930493e-07 9.467302e-07 9.999883e-01 4.901124e-07 [3,] 5.951746e-06 7.630259e-06 2.242811e-07 2.877459e-07 3.236534e-07 3.074517e-07 3.073479e-06 3.793896e-07 9.999982e-01 9.999987e-01 5.782216e-06 9.999792e-01 1.806516e-06 1.343686e-06 4.621117e-07 9.999880e-01 1.006786e-05 9.999976e-01 1.631281e-07 4.774464e-07 [4,] 4.975254e-07 9.999807e-01 9.999867e-01 2.895660e-05 9.999956e-01 9.999993e-01 6.742399e-06 2.449863e-06 2.454388e-05 3.987603e-07 9.523509e-08 8.106778e-06 3.409945e-06 9.999308e-01 2.985552e-06 1.224975e-07 4.436849e-06 7.413155e-06 1.571186e-05 1.011175e-06 , , 10 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 6.025299e-05 9.998551e-01 4.059556e-05 1.668977e-04 2.433515e-05 4.217274e-06 9.761684e-05 2.833966e-05 5.483448e-05 2.389355e-05 1.601926e-05 1.977348e-05 9.997866e-01 9.997556e-01 2.726634e-05 9.999195e-01 2.749315e-05 1.444973e-04 2.266668e-05 9.999245e-01 [2,] 2.749737e-05 2.013725e-06 2.332999e-05 7.195656e-05 9.999636e-01 5.983665e-05 9.999540e-01 4.236930e-05 4.082236e-05 1.886147e-05 9.998876e-01 3.822931e-05 9.999213e-01 7.214738e-05 7.406028e-06 2.510278e-05 5.777881e-06 1.303677e-05 9.998151e-01 1.015948e-05 [3,] 8.493904e-05 7.634405e-05 5.645534e-06 5.892476e-06 6.744750e-06 9.553348e-06 5.310500e-05 7.871473e-06 9.999585e-01 9.999731e-01 8.757889e-05 9.997830e-01 2.582519e-05 3.046973e-05 1.097782e-05 9.998179e-01 8.756181e-05 9.999607e-01 5.167076e-06 9.148996e-06 [4,] 1.144396e-05 9.997178e-01 9.998144e-01 3.452576e-04 9.999218e-01 9.999824e-01 9.308084e-05 4.811618e-05 2.509250e-04 9.990381e-06 2.380475e-06 1.129562e-04 4.838173e-05 9.992272e-01 5.276167e-05 3.753405e-06 7.619512e-05 8.912135e-05 1.766056e-04 1.545756e-05 , , 11 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.0005635756 9.987278e-01 0.0003118150 0.0014415649 2.394989e-04 6.729742e-05 0.0007589937 0.0003216302 0.0004931892 0.0002148075 0.0001832924 0.0001936947 0.9985615773 0.9978734393 2.191684e-04 9.991858e-01 0.0003195095 0.0008049775 0.0001918066 0.9993265251 [2,] 0.0002297083 5.294729e-05 0.0001757792 0.0007131906 9.995800e-01 5.983391e-04 0.9992534589 0.0003350504 0.0004157412 0.0002385721 0.9989972651 0.0005792547 0.9993839792 0.0006696340 7.462878e-05 1.746876e-04 0.0001143390 0.0001051912 0.9982014341 0.0001067501 [3,] 0.0006438122 5.228015e-04 0.0000815448 0.0001006535 8.907465e-05 1.421255e-04 0.0005640066 0.0001020179 0.9992441181 0.9995987124 0.0006588902 0.9983293160 0.0002109542 0.0005345595 1.836557e-04 9.985552e-01 0.0005838759 0.9996054830 0.0001206689 0.0001285573 [4,] 0.0001621132 9.971177e-01 0.9981753064 0.0023430866 9.992677e-01 9.997364e-01 0.0008969454 0.0005897861 0.0015806417 0.0001307868 0.0000373291 0.0011250001 0.0004685234 0.9946796185 4.684692e-04 6.417825e-05 0.0008603533 0.0007663840 0.0013966532 0.0001330534 , , 12 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.003207930 0.9924274155 0.0017683023 0.0080608302 0.0015072946 0.0005983833 0.003912004 0.0022318602 0.002916053 0.001194244 0.0013747285 0.001332733 0.992539916 0.987855341 0.0011359086 0.9948189585 0.002327847 0.0034599221 0.001167776 0.9961625529 [2,] 0.001362348 0.0007279368 0.0009392827 0.0046315598 0.9969944858 0.0038495202 0.993453150 0.0018723766 0.003127827 0.001734843 0.9938213699 0.004733750 0.996570554 0.004357241 0.0005648933 0.0009667622 0.001085163 0.0006177866 0.987883373 0.0007057776 [3,] 0.003300691 0.0024824987 0.0007105931 0.0009701423 0.0008055853 0.0010671971 0.003354187 0.0008201051 0.992340063 0.996199655 0.0029724540 0.991445181 0.001167437 0.005471197 0.0018196337 0.9926596582 0.002718133 0.9973018646 0.001218598 0.0011751260 [4,] 0.001548534 0.9814257053 0.9884896309 0.0091742677 0.9951499325 0.9973300962 0.005421486 0.0043860979 0.006477942 0.001038114 0.0003991436 0.007127175 0.002689543 0.977639293 0.0029675369 0.0007222258 0.006025633 0.0044347279 0.006708497 0.0008444167 , , 13 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.011794092 0.968658015 0.007086120 0.029620963 0.006505536 0.003596511 0.01456717 0.009489193 0.01150054 0.004546333 0.006507964 0.006197965 0.971871557 0.95398873 0.004602870 0.978101434 0.010576848 0.011553130 0.004889773 0.984345261 [2,] 0.005041870 0.005168430 0.003695153 0.017000407 0.985163638 0.012948397 0.96632206 0.006862488 0.01342284 0.008699937 0.978399914 0.022793487 0.986441312 0.01745322 0.002825294 0.003609819 0.005716019 0.003001047 0.952123538 0.003311131 [3,] 0.013360524 0.009050215 0.003939232 0.005850009 0.005363174 0.005794138 0.01245266 0.004638782 0.95447194 0.977384740 0.010139318 0.969118161 0.004930981 0.03219774 0.010693263 0.970706020 0.009378967 0.986491004 0.007480311 0.006558824 [4,] 0.009470218 0.930853021 0.955421504 0.024292221 0.977951197 0.981900413 0.02032356 0.018030572 0.02049860 0.005260739 0.003139358 0.026077088 0.010383441 0.93399937 0.012847680 0.005490011 0.022746328 0.016164483 0.021209815 0.003940384 , , 14 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.03011805 0.91656521 0.02110650 0.07183683 0.01853213 0.01328421 0.03570540 0.02860394 0.03335609 0.01147333 0.02083340 0.01970479 0.91961108 0.88008632 0.01477086 0.935764334 0.02802459 0.03067847 0.01472077 0.95522368 [2,] 0.01320264 0.02386574 0.01093102 0.03988661 0.94608105 0.03082716 0.88260055 0.01776206 0.03335997 0.03208952 0.94627921 0.07331433 0.96074018 0.03960936 0.01040946 0.009690986 0.02021938 0.01056673 0.88714406 0.01141996 [3,] 0.03501856 0.02517110 0.01460032 0.02066626 0.02522049 0.01921329 0.03013365 0.01857017 0.85137547 0.90650708 0.02460502 0.92173956 0.01686086 0.10167571 0.04263164 0.921163130 0.02295568 0.94996865 0.02628256 0.02564079 [4,] 0.03388104 0.83422842 0.88465767 0.05390033 0.93043427 0.92757917 0.05192118 0.04446570 0.05025055 0.01875624 0.01556785 0.05858700 0.02859815 0.84570188 0.03798120 0.022971926 0.05526340 0.04227847 0.05014724 0.01282830 , , 15 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.06475638 0.82434580 0.04841752 0.12512420 0.03994934 0.03397331 0.07146194 0.05910658 0.06301140 0.02255880 0.05122995 0.04740168 0.82621389 0.77580272 0.03753842 0.85004037 0.05679059 0.06626201 0.03606167 0.89995344 [2,] 0.02832982 0.06655256 0.02497545 0.07499754 0.85755012 0.06028330 0.73643810 0.03781423 0.05977657 0.08534499 0.88986060 0.15055374 0.90983881 0.06799482 0.02739943 0.02152628 0.04645560 0.02737151 0.79723107 0.02970546 [3,] 0.06500523 0.05319926 0.03562784 0.04420975 0.07142383 0.04287927 0.06060043 0.04421246 0.71128090 0.76365809 0.04762265 0.84140919 0.04201458 0.18918725 0.10341289 0.84449284 0.04479112 0.87814511 0.05532210 0.06150519 [4,] 0.07811969 0.71168185 0.79021128 0.09523425 0.84284430 0.81556566 0.08991322 0.07683996 0.08992436 0.04465189 0.04845545 0.09936197 0.05528658 0.72456111 0.08367862 0.05785919 0.09904296 0.07766218 0.09028028 0.02882520 , , 16 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.10558733 0.70846921 0.08369376 0.1753965 0.06993541 0.06079928 0.1112408 0.08949886 0.09962705 0.03818610 0.09667781 0.08824367 0.71608920 0.6564551 0.07550489 0.73693558 0.09204629 0.11071818 0.06852139 0.81637359 [2,] 0.05346907 0.11619089 0.04915198 0.1137622 0.73426410 0.09979069 0.5894820 0.06803626 0.08715589 0.15810245 0.80393740 0.21823376 0.82610850 0.1050530 0.05285639 0.04280284 0.07609334 0.05670326 0.69402884 0.05477706 [3,] 0.09879086 0.09473413 0.06739074 0.0732146 0.13217014 0.06992085 0.1018807 0.07998140 0.57719518 0.59621416 0.07913441 0.72896443 0.08529534 0.2605204 0.16495587 0.75215388 0.07442073 0.76733252 0.08906981 0.10665983 [4,] 0.12791585 0.60433461 0.68870516 0.1363719 0.72630607 0.67373509 0.1229581 0.11099341 0.12495209 0.07533167 0.09822294 0.13621975 0.08688374 0.6030964 0.14557341 0.10012612 0.13648753 0.11341770 0.13557960 0.05278885 , , 17 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.14778858 0.5967134 0.11838307 0.2095041 0.1058677 0.08900953 0.1417011 0.12061242 0.1321625 0.05852908 0.1437172 0.1412969 0.6068638 0.5527520 0.1207968 0.61948464 0.1202886 0.1541407 0.1055814 0.71480640 [2,] 0.08735734 0.1572278 0.08080008 0.1527860 0.6123088 0.13457182 0.4798262 0.09582212 0.1171574 0.21585128 0.7067984 0.2611780 0.7279142 0.1489197 0.0838005 0.07127243 0.1017680 0.0954636 0.5811369 0.08803942 [3,] 0.13608078 0.1373904 0.10531200 0.1090483 0.1803794 0.09885536 0.1313431 0.11427193 0.4727190 0.45918326 0.1227606 0.6270274 0.1353616 0.2946968 0.2116942 0.64230323 0.1042391 0.6450545 0.1235360 0.14874312 [4,] 0.16638531 0.5154673 0.59012097 0.1642013 0.6065179 0.55076442 0.1529704 0.14159960 0.1507760 0.10816012 0.1459408 0.1636599 0.1159193 0.5138579 0.2013320 0.13690948 0.1679023 0.1523601 0.1711648 0.08398995 , , 18 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.1807637 0.4974953 0.1480305 0.2302213 0.1425771 0.1150872 0.1631556 0.1459252 0.1587466 0.08272741 0.1844639 0.1905032 0.5172972 0.4782664 0.1677344 0.5196852 0.1488459 0.1887470 0.1327657 0.6069611 [2,] 0.1234522 0.1846382 0.1151513 0.1806128 0.5179259 0.1557207 0.4031548 0.1210651 0.1390771 0.23914001 0.6196486 0.2862670 0.6319940 0.1882141 0.1158935 0.1011785 0.1259401 0.1317896 0.4920960 0.1270406 [3,] 0.1682917 0.1729496 0.1361868 0.1495198 0.2044843 0.1234126 0.1542324 0.1401998 0.3893652 0.37981642 0.1643260 0.5408443 0.1758716 0.3049542 0.2358106 0.5439697 0.1319737 0.5477418 0.1561608 0.1798887 [4,] 0.1972861 0.4482744 0.5115489 0.1885115 0.5017011 0.4621441 0.1706789 0.1655568 0.1651995 0.13561497 0.1803287 0.1884056 0.1404655 0.4524717 0.2477648 0.1602411 0.1926411 0.1824289 0.1938173 0.1149191 , , 19 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2070618 0.4143667 0.1672552 0.2444017 0.1731964 0.1379033 0.1815071 0.1673912 0.1782845 0.1074680 0.2176410 0.2317926 0.4556504 0.4203560 0.2051207 0.4373939 0.1723337 0.2097033 0.1569579 0.5142149 [2,] 0.1593269 0.2107781 0.1450248 0.2049566 0.4345198 0.1709936 0.3433681 0.1393519 0.1600389 0.2467875 0.5403380 0.2962144 0.5507304 0.2169034 0.1506147 0.1293415 0.1496393 0.1648930 0.4181010 0.1680780 [3,] 0.1923270 0.2011437 0.1687888 0.1915354 0.2217300 0.1470279 0.1691652 0.1588746 0.3170013 0.3225879 0.1955450 0.4772834 0.2078362 0.3109961 0.2503301 0.4651001 0.1524077 0.4645004 0.1804672 0.2053520 [4,] 0.2245456 0.3956059 0.4379330 0.2064278 0.4158680 0.3860386 0.1817926 0.1853934 0.1757070 0.1570198 0.2086789 0.2109888 0.1690059 0.4088801 0.2781857 0.1807369 0.2116127 0.2076676 0.2089851 0.1489266 , , 20 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2249323 0.3569859 0.1846538 0.2491133 0.1955040 0.1584112 0.1897652 0.1828333 0.1897759 0.1304114 0.2415512 0.2542342 0.4167599 0.3849162 0.2267838 0.3751054 0.1990147 0.2157530 0.1761946 0.4473008 [2,] 0.1913346 0.2324250 0.1725690 0.2223965 0.3711606 0.1801809 0.2954864 0.1523096 0.1720356 0.2400848 0.4815268 0.3021691 0.4864439 0.2379356 0.1809403 0.1469577 0.1699195 0.1886775 0.3676323 0.2078144 [3,] 0.2092936 0.2227344 0.1911910 0.2181936 0.2358133 0.1696367 0.1770783 0.1752605 0.2707240 0.2797003 0.2159386 0.4323750 0.2306751 0.3152384 0.2604822 0.4051311 0.1678123 0.4028735 0.1958440 0.2240041 [4,] 0.2433436 0.3561326 0.3734042 0.2227785 0.3537965 0.3255428 0.1914063 0.1990210 0.1838823 0.1734397 0.2323482 0.2252992 0.1975793 0.3800982 0.2956410 0.1987654 0.2271618 0.2299955 0.2132410 0.1771228 , , 21 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2377064 0.3133684 0.2049550 0.2459901 0.2114603 0.1753277 0.1939971 0.1858533 0.1971317 0.1500832 0.2576552 0.2684959 0.3904256 0.3652263 0.2405421 0.3293107 0.2241386 0.2187661 0.1916519 0.3979145 [2,] 0.2138835 0.2477547 0.1933294 0.2348288 0.3245163 0.1858973 0.2596587 0.1630436 0.1797421 0.2335098 0.4415739 0.3055559 0.4422091 0.2513764 0.2058736 0.1586453 0.1870307 0.2014179 0.3340527 0.2361002 [3,] 0.2200008 0.2369135 0.2114403 0.2342176 0.2460922 0.1838390 0.1826320 0.1846442 0.2434755 0.2524582 0.2316581 0.3978828 0.2436830 0.3122561 0.2671133 0.3645021 0.1825717 0.3602325 0.2100508 0.2343363 [4,] 0.2540151 0.3213540 0.3274044 0.2363277 0.3130017 0.2835858 0.1972585 0.2067590 0.1883909 0.1868523 0.2472987 0.2394925 0.2207939 0.3640343 0.3043837 0.2151003 0.2418950 0.2450427 0.2112471 0.1957623 , , 22 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2436844 0.2835556 0.2192756 0.2472452 0.2228158 0.1840474 0.1955681 0.1893866 0.2000595 0.1642132 0.2724139 0.2784092 0.3685979 0.3487712 0.2532668 0.2998544 0.2424671 0.2227399 0.2039241 0.3597042 [2,] 0.2270862 0.2560085 0.2109808 0.2437580 0.2929100 0.1929230 0.2396416 0.1709176 0.1863803 0.2264114 0.4099465 0.3044087 0.4074149 0.2632779 0.2264301 0.1700443 0.1999412 0.2106868 0.3065838 0.2542486 [3,] 0.2345592 0.2446774 0.2250416 0.2405496 0.2526689 0.1891155 0.1882476 0.1889137 0.2266108 0.2352998 0.2425171 0.3711488 0.2536095 0.3115923 0.2742695 0.3338081 0.1959262 0.3324352 0.2212473 0.2377618 [4,] 0.2597798 0.2971939 0.2963240 0.2438201 0.2852939 0.2544479 0.1999735 0.2098507 0.1925675 0.1972827 0.2579189 0.2521136 0.2408173 0.3491820 0.3087821 0.2278534 0.2507189 0.2530080 0.2144304 0.2086413 , , 23 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2411384 0.2615726 0.2323242 0.2504117 0.2285776 0.1902473 0.1969662 0.1933986 0.2025721 0.1762236 0.2838160 0.2886213 0.3489796 0.3325405 0.2617299 0.2847983 0.2528399 0.2252976 0.2144757 0.3334689 [2,] 0.2375854 0.2629433 0.2262248 0.2472098 0.2687409 0.1993550 0.2214085 0.1801293 0.1918907 0.2180027 0.3792196 0.3038112 0.3776317 0.2739780 0.2474831 0.1838400 0.2118369 0.2160143 0.2869214 0.2657732 [3,] 0.2477327 0.2514196 0.2349224 0.2448983 0.2587316 0.1921682 0.1947466 0.1909699 0.2121751 0.2213536 0.2509629 0.3477255 0.2609678 0.3130104 0.2844462 0.3091361 0.2061083 0.3131399 0.2299162 0.2354686 [4,] 0.2652650 0.2730850 0.2759944 0.2464513 0.2681356 0.2280274 0.2029841 0.2092819 0.1970378 0.2059317 0.2688600 0.2659262 0.2582686 0.3355153 0.3099089 0.2378476 0.2580047 0.2564551 0.2209956 0.2160239 , , 24 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2425566 0.2529968 0.2394013 0.2502679 0.2323525 0.1953241 0.1969384 0.1955115 0.2029600 0.1854417 0.2875938 0.2939910 0.3352312 0.3225232 0.2692070 0.2745255 0.2560737 0.2298560 0.2242489 0.3129988 [2,] 0.2443945 0.2618355 0.2332836 0.2492685 0.2623499 0.2017113 0.2106497 0.1864741 0.1963838 0.2092154 0.3551891 0.3037325 0.3555381 0.2823137 0.2616492 0.1987051 0.2237823 0.2247042 0.2720340 0.2667855 [3,] 0.2484883 0.2509635 0.2401096 0.2490424 0.2618129 0.1959047 0.1987927 0.1928697 0.2046605 0.2114201 0.2632883 0.3345507 0.2693364 0.3111499 0.2924434 0.2923187 0.2156932 0.2976843 0.2351472 0.2343236 [4,] 0.2644658 0.2603707 0.2644578 0.2474191 0.2623004 0.2125940 0.2027443 0.2078510 0.1998801 0.2081842 0.2789915 0.2752215 0.2707820 0.3255051 0.3097251 0.2439487 0.2616636 0.2569091 0.2271957 0.2197903 , , 25 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2454056 0.2471946 0.2455302 0.2512200 0.2371245 0.1963245 0.1977557 0.1964242 0.2009760 0.1896996 0.2907567 0.2992956 0.3228842 0.3144553 0.2773675 0.2675132 0.2557541 0.2351614 0.2333487 0.2958084 [2,] 0.2512800 0.2580469 0.2378477 0.2487261 0.2571661 0.2010240 0.2064375 0.1902781 0.1989809 0.2057329 0.3339726 0.3021615 0.3356623 0.2899762 0.2743775 0.2137234 0.2333540 0.2362118 0.2623168 0.2627236 [3,] 0.2467276 0.2508011 0.2435359 0.2525465 0.2606871 0.1973821 0.2006409 0.1948287 0.2020372 0.2085497 0.2768300 0.3235382 0.2769000 0.3082305 0.2970295 0.2790604 0.2250199 0.2847353 0.2371858 0.2337337 [4,] 0.2601381 0.2520717 0.2575817 0.2498410 0.2584973 0.2081105 0.2016574 0.2060654 0.1998728 0.2067978 0.2865173 0.2830730 0.2814722 0.3172079 0.3105638 0.2452341 0.2631979 0.2548807 0.2330783 0.2241411 , , 26 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2458238 0.2474536 0.2485903 0.2507471 0.2417776 0.1966590 0.1979629 0.1988722 0.2005977 0.1934221 0.2924108 0.3031906 0.3128228 0.3084590 0.2843140 0.2651064 0.2513929 0.2397148 0.2401963 0.2804864 [2,] 0.2534648 0.2551237 0.2432663 0.2500615 0.2532563 0.2027718 0.2040990 0.1946131 0.2000492 0.2026050 0.3172465 0.3026941 0.3170477 0.2949886 0.2876117 0.2265168 0.2380832 0.2450729 0.2549007 0.2565270 [3,] 0.2464474 0.2523114 0.2451876 0.2509081 0.2568580 0.1971579 0.2018491 0.1961500 0.2007265 0.2054864 0.2880255 0.3112937 0.2831978 0.3067258 0.3007879 0.2683691 0.2345458 0.2754646 0.2416395 0.2368677 [4,] 0.2551626 0.2502681 0.2539018 0.2504254 0.2559504 0.2041301 0.2002145 0.2031214 0.2003403 0.2047603 0.2942885 0.2900835 0.2903634 0.3092812 0.3098273 0.2464189 0.2594339 0.2526135 0.2399531 0.2294620 , , 27 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2466816 0.2482647 0.2503448 0.2510142 0.2436365 0.1973453 0.1986117 0.2002758 0.2008114 0.1949092 0.2944351 0.3020805 0.3056093 0.3043439 0.2899652 0.2615381 0.2510431 0.2437700 0.2438305 0.2714891 [2,] 0.2542713 0.2533486 0.2474493 0.2497533 0.2510305 0.2034171 0.2026789 0.1979595 0.1998027 0.2008244 0.3078122 0.3028143 0.3050775 0.2976874 0.2946094 0.2344994 0.2411583 0.2495137 0.2527566 0.2535357 [3,] 0.2462475 0.2528773 0.2458187 0.2507964 0.2541786 0.1969980 0.2023018 0.1966550 0.2006371 0.2033429 0.2945129 0.3047284 0.2893595 0.3040899 0.3028516 0.2622416 0.2400925 0.2681669 0.2444765 0.2396270 [4,] 0.2519935 0.2489827 0.2512706 0.2511822 0.2545517 0.2015948 0.1991861 0.2010165 0.2009458 0.2036414 0.3002652 0.2957543 0.2970501 0.3039402 0.3069032 0.2461465 0.2560769 0.2506627 0.2439317 0.2349037 , , 28 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2474888 0.2494854 0.2510546 0.2511547 0.2453574 0.1979911 0.1995883 0.2008437 0.2009237 0.1962859 0.2969866 0.2993825 0.3012656 0.3013856 0.2944289 0.2575335 0.2515437 0.2468361 0.2465360 0.2639278 [2,] 0.2532787 0.2519888 0.2496034 0.2494510 0.2495356 0.2026230 0.2015910 0.1996827 0.1995608 0.1996285 0.3039345 0.3023866 0.2995241 0.2993411 0.2994427 0.2401638 0.2440336 0.2511898 0.2516471 0.2513932 [3,] 0.2472997 0.2520940 0.2462708 0.2510095 0.2523834 0.1978398 0.2016752 0.1970167 0.2008076 0.2019067 0.2967597 0.3025128 0.2955250 0.3012114 0.3028600 0.2581008 0.2437180 0.2611875 0.2469715 0.2428499 [4,] 0.2509249 0.2487737 0.2500511 0.2511652 0.2532536 0.2007399 0.1990189 0.2000409 0.2009321 0.2026029 0.3011099 0.2985284 0.3000613 0.3013982 0.3039043 0.2472252 0.2536790 0.2498466 0.2465045 0.2402393 , , 29 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.2487254 0.2497180 0.2505036 0.2505539 0.2476739 0.1989803 0.1997744 0.2004029 0.2004431 0.1981391 0.2984705 0.2996616 0.3006044 0.3006647 0.2972087 0.2538237 0.2508459 0.2484891 0.2483383 0.2569782 [2,] 0.2516259 0.2509737 0.2497769 0.2497008 0.2497431 0.2013007 0.2007790 0.1998215 0.1997607 0.1997945 0.3019511 0.3011685 0.2997323 0.2996410 0.2996917 0.2451223 0.2470788 0.2506692 0.2508975 0.2507708 [3,] 0.2486318 0.2510268 0.2481235 0.2504810 0.2511728 0.1989054 0.2008214 0.1984988 0.2003848 0.2009383 0.2983582 0.3012321 0.2977483 0.3005772 0.3014074 0.2541046 0.2469196 0.2556294 0.2485570 0.2464815 [4,] 0.2504385 0.2493633 0.2500007 0.2505592 0.2516132 0.2003508 0.1994906 0.2000005 0.2004473 0.2012905 0.3005262 0.2992360 0.3000008 0.3006710 0.3019358 0.2486844 0.2519101 0.2499980 0.2483225 0.2451605 , , 30 [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [1,] 0.25 0.25 0.25 0.25 0.25 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.25 0.25 0.25 0.25 0.25 [2,] 0.25 0.25 0.25 0.25 0.25 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.25 0.25 0.25 0.25 0.25 [3,] 0.25 0.25 0.25 0.25 0.25 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.25 0.25 0.25 0.25 0.25 [4,] 0.25 0.25 0.25 0.25 0.25 0.2 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.25 0.25 0.25 0.25 0.25 $predclass [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13] [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25] [,26] [,27] [,28] [,29] [,30] [1,] "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "3" "3" "3" "3" "3" "3" "3" [2,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [3,] "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "3" "3" "3" "3" "3" [4,] "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "1" "3" "3" "3" "3" "3" "3" "3" "3" [5,] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "3" "3" "3" "3" "3" "3" "3" "3" [6,] "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [7,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [8,] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "3" "3" "3" "3" "3" "3" "3" [9,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [10,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [11,] "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "3" "3" "3" "3" "3" [12,] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "3" "3" "3" "3" "3" "3" "3" [13,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [14,] "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "3" "3" "3" "3" "3" "3" "3" [15,] "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [16,] "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [17,] "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "4" "3" "3" "3" "3" "3" [18,] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "4" "3" "3" "3" "3" "3" "3" [19,] "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "2" "3" "3" "3" "3" "3" "3" "3" "3" "3" "3" [20,] "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "1" "3" "3" "3" "3" "3" "3" "3" "3" "3" > > > > > cleanEx(); ..nameEx <- "pamr.surv.to.class2" > > ### * pamr.surv.to.class2 > > flush(stderr()); flush(stdout()) > > ### Name: pamr.surv.to.class2 > ### Title: A function to assign observations to categories, based on their > ### survival times. > ### Aliases: pamr.surv.to.class2 > > > ### ** Examples > > > gendata<-function(n=100, p=2000){ + tim <- 3*abs(rnorm(n)) + u<-runif(n,min(tim),max(tim)) + y<-pmin(tim,u) + ic<-1*(timm] <- x[1:100, tim>m]+3 + return(list(x=x,y=y,ic=ic)) + } > > # generate training data; 2000 genes, 100 samples > > junk<-gendata(n=100) > y<-junk$y > ic<-junk$ic > x<-junk$x > d <- list(x=x,survival.time=y, censoring.status=ic, + geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep= + ""),) > > # train model > a3<- pamr.train(d, ngroup.survival=2) Loading required package: survival Loading required package: splines 123456789101112131415161718192021222324252627282930> > # generate test data > junkk<- gendata(n=500) > > dd <- list(x=junkk$x, survival.time=junkk$y, censoring.status=junkk$ic) > > # compute soft labels > proby <- pamr.surv.to.class2(dd$survival.time, dd$censoring.status, + n.class=a3$ngroup.survival)$prob > > > > > cleanEx(); ..nameEx <- "pamr.test.errors.surv.compute" > > ### * pamr.test.errors.surv.compute > > flush(stderr()); flush(stdout()) > > ### Name: pamr.test.errors.surv.compute > ### Title: A function giving a table of true versus predicted values, from > ### a nearest shrunken centroid fit from survival data. > ### Aliases: pamr.test.errors.surv.compute > > > ### ** Examples > > > gendata<-function(n=100, p=2000){ + tim <- 3*abs(rnorm(n)) + u<-runif(n,min(tim),max(tim)) + y<-pmin(tim,u) + ic<-1*(timm] <- x[1:100, tim>m]+3 + return(list(x=x,y=y,ic=ic)) + } > > # generate training data; 2000 genes, 100 samples > > junk<-gendata(n=100) > y<-junk$y > ic<-junk$ic > x<-junk$x > d <- list(x=x,survival.time=y, censoring.status=ic, + geneid=as.character(1:nrow(x)), genenames=paste("g",as.character(1:nrow(x)),sep= + ""),) > > # train model > a3<- pamr.train(d, ngroup.survival=2) Loading required package: survival Loading required package: splines 123456789101112131415161718192021222324252627282930> > # generate test data > junkk<- gendata(n=500) > > dd <- list(x=junkk$x, survival.time=junkk$y, censoring.status=junkk$ic) > > # compute soft labels > proby <- pamr.surv.to.class2(dd$survival.time, dd$censoring.status, + n.class=a3$ngroup.survival)$prob > > # make class predictions for test data > yhat <- pamr.predict(a3,dd$x, threshold=1.0) > > # compute test errors > > pamr.test.errors.surv.compute(proby, yhat) $confusion 1 2 Class Error rate 1 189.21699 9.702164 0.04877441 2 60.78301 240.297836 0.20188269 $error [1] 0.1408997 > > > > > cleanEx(); ..nameEx <- "pamr.train" > > ### * pamr.train > > flush(stderr()); flush(stdout()) > > ### Name: pamr.train > ### Title: A function to train a nearest shrunken centroid classifier > ### Aliases: pamr.train > > > ### ** Examples > > #generate some data > set.seed(120) > x <- matrix(rnorm(1000*20),ncol=20) > y <- sample(c(1:4),size=20,replace=TRUE) > mydata <- list(x=x,y=factor(y)) > > #train classifier > results<- pamr.train(mydata) 123456789101112131415161718192021222324252627282930> > # train classifier on all data except class 4 > results2 <- pamr.train(mydata,sample.subset=(mydata$y!=4)) 123456789101112131415161718192021222324252627282930> > # train classifier on only the first 500 genes > results3 <- pamr.train(mydata,gene.subset=1:500) 123456789101112131415161718192021222324252627282930> > > > > ### *