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<-6 > KS<-10 > 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="")) + } 91 1 120.198 25.366 60.977 39.862 61.244 40.096 61.097 39.907 1174.62 91 2 120.198 25.366 35.914 15.599 36.087 15.696 35.598 15.237 966.05 91 3 120.198 25.366 26.553 8.656 26.886 8.795 26.348 8.776 874.49 91 4 120.198 25.366 22.272 6.525 23.649 7.052 21.924 7.237 858.76 91 5 120.198 25.366 19.81 5.932 21.729 6.098 19.398 7.172 861.65 91 6 120.198 25.366 18.258 5.861 20.794 5.888 16.646 9.985 860.36 91 7 120.198 25.366 16.348 6.05 19.543 5.871 14.675 12.152 872.73 91 8 120.198 25.366 16.066 5.982 18.636 5.903 12.927 13.925 860.29 92 1 119.53 24.982 30.382 8.49 30.402 8.5 30.369 8.365 837.21 92 2 119.53 24.982 25.124 5.396 25.437 5.478 25.071 5.95 794.47 92 3 119.53 24.982 22.772 4.578 24.209 4.657 22.239 6.427 797.31 92 4 119.53 24.982 20.222 4.585 22.959 4.653 19.755 7.41 811.89 92 5 119.53 24.982 20.428 4.319 22.528 4.361 17.238 10.069 801.4 92 6 119.53 24.982 20.534 4.191 22.351 4.214 15.194 11.901 798.69 92 7 119.53 24.982 16.969 4.801 19.576 4.845 13.114 13.993 816.14 92 8 119.53 24.982 17.355 4.586 19.639 4.59 11.551 14.808 811.39 93 1 120.42 24.548 56.648 35.672 56.835 35.828 56.717 35.696 1138.47 93 2 120.42 24.548 27.646 6.658 27.755 6.728 27.635 6.52 839.91 93 3 120.42 24.548 23.216 4.553 23.768 4.685 23.038 5.71 805.28 93 4 120.42 24.548 21.254 4.43 23.403 4.693 20.634 7.934 815.8 93 5 120.42 24.548 19.941 4.365 22.706 4.519 18.261 9.837 819.41 93 6 120.42 24.548 18.039 4.507 21.214 4.69 15.958 11.402 829.38 93 7 120.42 24.548 18.356 4.284 20.691 4.28 13.873 12.295 823.12 93 8 120.42 24.548 16.971 4.449 19.649 4.375 12.026 14.254 829.74 94 1 119.918 24.539 68.5 46.025 69.249 46.718 68.974 46.245 1235.2 94 2 119.918 24.539 32.564 11.485 32.751 11.619 32.444 11.477 918.01 94 3 119.918 24.539 23.984 5.161 24.439 5.265 23.831 5.292 821.86 94 4 119.918 24.539 21.163 4.632 22.831 5.056 20.789 5.854 826.48 94 5 119.918 24.539 19.016 4.495 21.284 4.575 18.18 7.711 828.31 94 6 119.918 24.539 17.452 4.661 20.103 4.615 15.896 10.271 832.25 94 7 119.918 24.539 16.297 4.817 18.934 4.694 13.95 11.796 832.98 94 8 119.918 24.539 16.712 4.767 18.723 4.738 11.985 13.396 824.02 95 1 127.243 24.039 33.404 9.038 33.434 9.054 33.407 9.064 883.35 95 2 127.243 24.039 25.002 5.106 25.203 5.219 24.973 5.68 790.72 95 3 127.243 24.039 21.058 3.892 22.139 3.988 20.979 5.928 776.32 95 4 127.243 24.039 18.387 4.4 19.414 4.423 17.94 8.183 758.33 95 5 127.243 24.039 16.935 4.644 18.909 4.81 15.921 9.913 762.79 95 6 127.243 24.039 15.057 5.007 17.882 4.891 14.005 11.761 774.36 95 7 127.243 24.039 14.673 4.828 17.453 4.626 12.162 13.375 773.24 95 8 127.243 24.039 14.308 4.771 16.647 4.634 10.466 14.811 772.85 96 1 120.36 26.106 43.768 19.819 43.833 19.862 43.746 19.825 1011.38 96 2 120.36 26.106 34.434 13.425 34.808 13.519 34.068 14.595 938.83 96 3 120.36 26.106 24.788 5.918 25.378 6.198 24.598 6.793 843.09 96 4 120.36 26.106 21.666 4.938 22.642 4.843 21.205 7.115 823.84 96 5 120.36 26.106 19.121 5.23 21.705 5.226 18.409 9.481 838.78 96 6 120.36 26.106 16.81 5.633 20.063 5.352 16.143 11.716 849.04 96 7 120.36 26.106 15.113 6.107 18.383 5.944 13.753 13.513 852.26 96 8 120.36 26.106 17.41 5.37 19.528 5.233 11.831 15.377 827.53 97 1 135.171 28.651 36.057 9.205 36.082 9.217 36.032 9.349 919.23 97 2 135.171 28.651 29.025 4.694 29.417 4.773 28.971 5.562 863.46 97 3 135.171 28.651 27.419 3.896 28.714 4.042 25.34 7.531 859.43 97 4 135.171 28.651 23.842 4.18 25.785 4.486 21.877 10.4 859.51 97 5 135.171 28.651 19.973 5.379 21.904 5.416 18.983 11.335 852.33 97 6 135.171 28.651 17.847 5.872 20.862 5.804 16.544 13.88 855.47 97 7 135.171 28.651 17.637 5.539 20.451 5.495 14.098 16.152 854.32 97 8 135.171 28.651 17.583 5.371 20.08 5.25 11.714 18.029 851.5 98 1 117.399 26.182 39.545 17.88 39.603 17.922 39.543 17.776 964.39 98 2 117.399 26.182 24.683 4.492 24.852 4.529 24.645 4.467 786.84 98 3 117.399 26.182 21.656 4.465 23.063 4.508 21.727 6.611 787.57 98 4 117.399 26.182 19.734 4.756 21.688 4.804 18.928 9.102 783.48 98 5 117.399 26.182 16.9 5.437 19.771 5.468 16.386 10.948 793.07 98 6 117.399 26.182 15.522 5.799 18.513 5.718 14.105 13.686 791.18 98 7 117.399 26.182 13.282 6.622 16.778 6.267 11.729 15.24 798.86 98 8 117.399 26.182 14.737 5.958 16.947 5.88 10.015 16.965 780.66 99 1 125.715 24.171 64.264 37.181 64.548 37.407 64.375 37.091 1199.51 99 2 125.715 24.171 36.338 14.773 37.014 15.24 36.271 15.216 982.14 99 3 125.715 24.171 23.593 5.873 23.889 5.986 23.462 6.268 813.81 99 4 125.715 24.171 19.886 4.703 20.813 4.829 19.596 5.934 786.01 99 5 125.715 24.171 16.924 5.07 19.079 5.108 16.856 8.735 795.52 99 6 125.715 24.171 15.375 5.419 18.323 5.235 14.395 10.694 783.67 99 7 125.715 24.171 15.62 5.056 17.905 4.893 12.295 12.762 777.58 99 8 125.715 24.171 13.122 6.117 14.979 6.012 10.633 13.652 785.27 100 1 118.17 22.639 44.282 22.749 44.363 22.811 44.292 22.589 1018.78 100 2 118.17 22.639 29.818 10.822 30.208 10.982 29.82 11.15 876.39 100 3 118.17 22.639 20.536 3.148 20.85 3.265 20.405 3.593 743.4 100 4 118.17 22.639 18.542 3.319 19.661 3.32 18.03 5.822 750.63 100 5 118.17 22.639 17.276 3.458 18.85 3.419 15.889 7.524 754 100 6 118.17 22.639 17.805 3.071 19.09 3.082 13.958 9.348 751.08 100 7 118.17 22.639 15.146 3.754 17.671 3.665 12.097 10.988 765.2 100 8 118.17 22.639 14.635 3.843 16.844 3.744 10.619 12.324 766.13 > > >