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<-7 > 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="")) + } 61 1 120.918 24.626 59.435 40.296 59.635 40.474 59.487 40.312 1160.42 61 2 120.918 24.626 36.659 16.529 36.877 16.682 36.421 16.069 977.25 61 3 120.918 24.626 25.096 7.239 25.653 7.454 24.894 7.718 840.67 61 4 120.918 24.626 20.008 5.357 20.71 5.297 19.689 6.412 781.09 61 5 120.918 24.626 18.468 5.363 19.971 5.322 17.108 9.105 789.51 61 6 120.918 24.626 17.211 5.427 19.491 5.298 14.588 10.485 793.36 61 7 120.918 24.626 14.291 6.347 16.595 6.297 12.516 12.527 800.65 61 8 120.918 24.626 12.838 6.761 15.583 6.466 10.857 14.093 805.62 62 1 123.632 28.224 38.352 9.427 38.392 9.445 38.348 9.317 949.54 62 2 123.632 28.224 30.154 5.098 30.604 5.288 30.092 5.397 883.98 62 3 123.632 28.224 25.875 3.713 26.687 3.767 25.732 5.292 859.87 62 4 123.632 28.224 23.555 3.685 25.341 3.675 22.546 7.933 859.92 62 5 123.632 28.224 21.025 4.18 23.48 4.225 19.667 10.404 867.55 62 6 123.632 28.224 18.781 4.702 22.277 4.585 16.6 13.078 873.27 62 7 123.632 28.224 20.084 4.026 22.747 3.922 14.282 14.947 864.88 62 8 123.632 28.224 16.794 5.02 19.936 4.849 12.149 16.845 873.57 63 1 130.444 28.437 83.207 57.406 84.544 58.636 84.003 58.551 1331.49 63 2 130.444 28.437 43.624 20.312 43.887 20.501 43.614 20.391 1060.26 63 3 130.444 28.437 31.146 11.212 31.497 11.361 31.107 11.764 949.05 63 4 130.444 28.437 23.071 5.904 23.435 5.969 22.69 6.278 856.03 63 5 130.444 28.437 20.456 6.013 21.944 5.98 19.346 9.349 856.67 63 6 130.444 28.437 18.579 6.499 20.234 6.443 16.781 11.818 857.15 63 7 130.444 28.437 15.996 7.395 18.621 7.26 14.376 14.083 864.69 63 8 130.444 28.437 14.645 7.856 17.455 7.655 12.213 16.283 867.58 64 1 124.576 27.091 59.249 32.444 59.461 32.612 59.264 32.406 1159.34 64 2 124.576 27.091 33.309 11.212 33.486 11.329 33.091 11.477 928.88 64 3 124.576 27.091 26.262 7.09 26.838 7.366 25.815 8.472 862.12 64 4 124.576 27.091 22.376 4.833 23.483 4.882 22.074 6.017 858.09 64 5 124.576 27.091 19.644 5.187 21.546 5.233 19.059 8.467 861.23 64 6 124.576 27.091 18.7 5.161 21.496 5.055 16.26 11.175 856.59 64 7 124.576 27.091 15.493 6.193 18.103 6.031 13.651 14.4 864.29 64 8 124.576 27.091 14.941 6.216 18.059 5.934 11.687 16.641 861.05 65 1 126.405 24.902 43.718 19.469 43.794 19.521 43.742 19.632 1012.87 65 2 126.405 24.902 27.689 6.943 27.894 7.009 27.671 7.641 836.35 65 3 126.405 24.902 20.087 4.533 20.419 4.487 20.047 5.95 733 65 4 126.405 24.902 18.085 4.579 19.387 4.51 17.767 7.446 736.3 65 5 126.405 24.902 17.175 4.604 18.965 4.518 15.516 9.899 738.15 65 6 126.405 24.902 15.246 5.182 17.802 4.984 13.402 12.141 746.64 65 7 126.405 24.902 14.261 5.408 16.725 5.241 11.541 13.712 749.03 65 8 126.405 24.902 14.501 5.206 16.597 5.098 9.66 15.648 744.08 66 1 114.525 21.846 25.449 6.859 25.46 6.865 25.446 6.789 752.34 66 2 114.525 21.846 20.851 3.792 21.114 3.868 20.517 3.659 707.42 66 3 114.525 21.846 18.288 3.943 19.099 4.18 18.181 5.616 699.89 66 4 114.525 21.846 16.61 3.733 18.194 3.694 15.855 7.284 700.57 66 5 114.525 21.846 15.049 4.02 17.038 3.902 13.815 9.238 702.04 66 6 114.525 21.846 14.725 3.867 16.797 3.719 12.108 10.437 700.88 66 7 114.525 21.846 12.085 4.989 14.46 4.781 10.352 11.69 710.74 66 8 114.525 21.846 12.97 4.29 14.762 4.174 9.205 12.898 705.76 67 1 123.833 22.813 39.426 20.117 39.487 20.161 39.432 20.19 962.92 67 2 123.833 22.813 24.423 5.51 24.643 5.498 24.378 5.693 780.59 67 3 123.833 22.813 19.383 3.46 19.796 3.427 19.197 4.429 713.14 67 4 123.833 22.813 17.519 3.554 19.003 3.489 17.04 6.411 717.08 67 5 123.833 22.813 16.654 3.608 18.184 3.52 14.855 8.486 715.67 67 6 123.833 22.813 15.303 3.895 17.041 3.785 12.657 10.382 721.37 67 7 123.833 22.813 14.48 4.095 16.31 3.959 11.036 12.057 723.12 67 8 123.833 22.813 13.874 4.248 15.838 4.106 9.595 13.428 725.04 68 1 124.148 25.213 27.79 6.766 27.803 6.772 27.784 6.801 794.64 68 2 124.148 25.213 23.414 3.78 23.657 3.806 23.298 3.984 757.91 68 3 124.148 25.213 20.704 4.161 22.138 4.076 20.428 6.574 759.06 68 4 124.148 25.213 19.161 4.264 21.224 4.231 18.032 9.057 763 68 5 124.148 25.213 19.844 3.789 21.406 3.769 16.126 10.982 758.98 68 6 124.148 25.213 16.847 4.467 19.662 4.36 14.142 12.712 771.42 68 7 124.148 25.213 15.516 4.801 18.366 4.816 12.333 15.012 777.35 68 8 124.148 25.213 15.489 4.69 18.078 4.556 10.583 16.173 775.13 69 1 121.604 23.655 45.36 24.115 45.455 24.188 45.387 24.08 1030.8 69 2 121.604 23.655 28.214 9.968 28.388 10.067 28.232 10.243 851.67 69 3 121.604 23.655 20.167 4.994 20.346 5.02 20.14 5.345 739.28 69 4 121.604 23.655 18.446 4.678 20.087 4.683 17.997 7.195 748.33 69 5 121.604 23.655 17.264 4.555 19.445 4.5 15.945 8.393 751.83 69 6 121.604 23.655 15.975 4.698 18.055 4.556 13.83 10.797 755.8 69 7 121.604 23.655 15.486 4.711 17.669 4.642 12.11 12.165 754.3 69 8 121.604 23.655 13.266 5.342 15.601 5.17 10.314 13.764 770.33 70 1 123.733 24.114 40.944 17.817 41.002 17.858 40.933 17.919 980.77 70 2 123.733 24.114 26.245 7.109 26.376 7.172 26.178 7.696 813.12 70 3 123.733 24.114 21.457 4.407 21.957 4.472 21.11 4.678 777.68 70 4 123.733 24.114 18.936 4.677 19.855 4.7 18.55 7.19 773.62 70 5 123.733 24.114 18.182 4.441 19.757 4.457 16.404 8.883 778.49 70 6 123.733 24.114 16.172 4.847 18.757 4.714 14.406 11.074 791.18 70 7 123.733 24.114 15.731 4.718 18.252 4.588 12.518 13.079 792.3 70 8 123.733 24.114 16.32 4.484 18.295 4.441 10.878 13.823 788.17 > > > >