R version 2.10.1 (2009-12-14) Copyright (C) 2009 The R Foundation for Statistical Computing 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. Natural language support but running in an English locale 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 an HTML browser interface to help. Type 'q()' to quit R. > library(coda) Loading required package: lattice > > S<-11000 ; burn<-1000 ; odens<-1 > > R0<-4 > KS<-8 > seeds<- 1:10 + (KS-1)*10 > MS<-NULL > > for(seed in seeds) + { + set.seed(seed) + source("datagen.r") # generate data + for(R in 1:8) # for each presumed rank + { + source("hbayes.r") + mse<-c(mean(Y^2), # size of matrix + mean((Y-M0)^2), # MSE of Y + mean((Y-M.ps/nss)^2) , # RSS of mean + mean((M0-M.ps/nss)^2), # MSE of of mean + mean((Y-M.mode)^2) , # RSS of mode + mean((M0-M.mode)^2), # MSE of mode + mean((Y-M.ols)^2), # RSS of ols + mean((M0-M.ols)^2)) # MSE of ols + cat(seed,R,round(100*mse,3)," ",round(DIC,2),"\n") + MS<-rbind(MS,c(seed,R,mse,DIC,eSS)) + } + dput(MS,paste("hbayes.SS",KS,".R0",R0,".results",sep="")) + } 71 1 135.74 28.452 56.21 29.787 56.341 29.884 56.234 30.015 1133.7 71 2 135.74 28.452 29.904 10.104 30.059 10.175 29.81 10.37 878.02 71 3 135.74 28.452 23.525 6.289 23.822 6.356 23.382 7.066 812.11 71 4 135.74 28.452 21.016 6.383 22.468 6.398 20.579 9.671 817.41 71 5 135.74 28.452 20.025 6.379 21.979 6.367 18.041 11.958 814.86 71 6 135.74 28.452 17.047 7.299 19.669 7.164 15.517 14.379 823.46 71 7 135.74 28.452 16.555 7.318 19.173 7.161 13.575 16.324 821.39 71 8 135.74 28.452 14.856 7.902 17.757 7.596 11.708 18.091 826.7 72 1 119.299 25.14 24.814 3.121 24.824 3.122 24.807 3.057 740.27 72 2 119.299 25.14 22.053 2.851 22.945 2.758 21.933 5.266 737.07 72 3 119.299 25.14 20.336 3.071 21.974 3.099 19.403 6.879 738.02 72 4 119.299 25.14 18.4 3.38 20.993 3.228 17.045 9.158 745.75 72 5 119.299 25.14 16.648 3.804 19.564 3.616 14.97 11.021 751.72 72 6 119.299 25.14 14.475 4.562 17.286 4.474 13.011 12.846 760.79 72 7 119.299 25.14 13.254 5.049 16.499 4.8 11.212 14.648 759.82 72 8 119.299 25.14 11.84 5.727 14.814 5.507 9.492 16.378 765.78 73 1 133.218 25.659 40.562 17.357 40.606 17.387 40.569 17.525 976.53 73 2 133.218 25.659 23.613 5.193 23.71 5.229 23.563 5.432 765.03 73 3 133.218 25.659 21.038 4.56 22.157 4.606 20.767 6.175 766.03 73 4 133.218 25.659 18.492 4.679 21.436 4.463 18.015 8.855 776.92 73 5 133.218 25.659 16.383 5.127 18.869 4.959 15.468 11.343 772.08 73 6 133.218 25.659 14.266 5.941 16.711 5.923 13.21 13.101 768.96 73 7 133.218 25.659 12.767 6.765 15.274 6.528 11.289 15.165 757.7 73 8 133.218 25.659 11.609 7.332 13.739 7.14 9.341 16.908 755.42 74 1 130.583 25.318 43.62 17.41 43.687 17.458 43.622 17.494 1011.62 74 2 130.583 25.318 28.019 5.028 28.192 5.084 28.017 5.278 847.15 74 3 130.583 25.318 22.118 2.817 22.475 2.894 21.829 4 774.63 74 4 130.583 25.318 19.35 3.32 20.851 3.329 18.857 6.995 781.15 74 5 130.583 25.318 17.32 3.888 19.644 3.765 16.648 9.288 783.32 74 6 130.583 25.318 17.552 3.517 19.376 3.378 14.439 11.292 781.44 74 7 130.583 25.318 13.847 5.076 16.389 4.878 12.24 13.448 790.48 74 8 130.583 25.318 13.767 4.815 16.39 4.545 10.337 15.177 789 75 1 121.804 28.071 36.897 11.994 36.938 12.018 36.878 11.914 930.56 75 2 121.804 28.071 26.633 3.541 26.797 3.567 26.607 3.575 821.75 75 3 121.804 28.071 24.783 3.406 26.326 3.535 23.637 6.512 824.66 75 4 121.804 28.071 21.389 3.725 24.377 3.776 20.62 9.211 833.83 75 5 121.804 28.071 19.327 4.148 22.615 3.947 17.657 11.643 832.66 75 6 121.804 28.071 17.518 4.691 21.012 4.435 15.13 13.665 830.14 75 7 121.804 28.071 16.874 4.846 19.592 4.665 13.085 15.71 828.57 75 8 121.804 28.071 17.194 4.678 19.371 4.524 11.069 17.623 825.28 76 1 122.227 23.358 25.808 2.973 25.821 2.976 25.805 2.964 759.14 76 2 122.227 23.358 21.959 1.91 22.251 1.928 21.891 2.691 727.18 76 3 122.227 23.358 18.796 3.06 19.67 3.101 18.877 5.577 717.5 76 4 122.227 23.358 16.897 3.293 18.867 3.253 16.677 7.856 727.08 76 5 122.227 23.358 15.379 3.575 17.629 3.511 14.311 9.859 727.63 76 6 122.227 23.358 14.799 3.591 17.173 3.504 12.775 11.407 724.48 76 7 122.227 23.358 13.183 4.252 15.873 4.07 11.092 13.044 729.55 76 8 122.227 23.358 12.544 4.441 15.002 4.307 9.449 14.707 729.77 77 1 124.048 21.832 39.331 21.529 39.38 21.563 39.339 21.693 961.89 77 2 124.048 21.832 28.793 12.958 28.988 13.032 28.755 13.341 860.48 77 3 124.048 21.832 20.077 5.038 20.275 5.103 19.94 5.184 736.67 77 4 124.048 21.832 17.248 4.418 18.026 4.454 17.026 5.304 727.05 77 5 124.048 21.832 15.846 4.548 17.625 4.428 14.998 7.778 730.73 77 6 124.048 21.832 14.446 4.779 17.014 4.676 13.331 9.096 738.37 77 7 124.048 21.832 13.954 4.831 15.969 4.686 11.594 10.893 739.19 77 8 124.048 21.832 13.147 4.984 15.181 4.826 10.025 12.296 742.73 78 1 125.408 25.074 34.105 13.063 34.133 13.08 34.105 13.178 893.16 78 2 125.408 25.074 27.064 7.117 27.864 7.613 27.142 7.303 846.53 78 3 125.408 25.074 22.351 4.502 23.008 4.51 22.183 5.602 791.11 78 4 125.408 25.074 20.404 4.397 22.312 4.476 19.611 7.944 797.29 78 5 125.408 25.074 18.679 4.537 21.045 4.516 17.438 9.497 800.96 78 6 125.408 25.074 17.04 4.804 19.342 4.737 14.745 11.176 804.31 78 7 125.408 25.074 15.386 5.172 18.076 5.141 12.782 12.943 810.92 78 8 125.408 25.074 14.256 5.483 17.245 5.261 11.096 14.576 812.14 79 1 122.586 23.736 23.735 1.436 23.743 1.437 23.725 1.418 718.79 79 2 122.586 23.736 22.054 1.36 23.316 1.368 21.602 3.469 726.06 79 3 122.586 23.736 20.089 1.472 22.127 1.433 19.322 5.698 735.79 79 4 122.586 23.736 19.082 1.569 21.261 1.462 17.158 7.517 736.31 79 5 122.586 23.736 17.215 1.95 19.666 1.843 14.991 9.039 744.78 79 6 122.586 23.736 16.142 2.22 18.855 2.05 13.368 10.68 748.22 79 7 122.586 23.736 15.613 2.361 18.041 2.218 11.579 12.476 746.75 79 8 122.586 23.736 14.995 2.566 17.472 2.399 10.08 13.714 745.47 80 1 115.149 23.845 24.923 3.091 24.934 3.094 24.917 2.986 742.36 80 2 115.149 23.845 21.561 2.625 22.091 2.657 21.534 3.907 725.93 80 3 115.149 23.845 19.307 2.776 21.194 2.738 18.95 5.509 733.18 80 4 115.149 23.845 17.348 3.096 19.344 3.029 16.478 7.881 737.32 80 5 115.149 23.845 16.119 3.364 18.449 3.265 14.59 10.186 737.47 80 6 115.149 23.845 15.786 3.29 18.195 3.172 12.716 11.744 736.28 80 7 115.149 23.845 14.353 3.741 16.704 3.625 10.986 13.347 741.69 80 8 115.149 23.845 12.64 4.421 15.102 4.214 9.241 15.049 747.03 > > > >