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<-2 > KS<-9 > 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="")) + } 81 1 123.177 24.344 37.477 16.604 37.514 16.627 37.461 16.639 938.12 81 2 123.177 24.344 22.034 2.669 22.133 2.704 21.927 2.537 730.7 81 3 123.177 24.344 20.045 2.772 21.877 2.648 19.268 5.077 736.59 81 4 123.177 24.344 18.369 2.986 20.338 2.873 17.166 7.197 742.26 81 5 123.177 24.344 16.726 3.404 19.031 3.211 15.27 9.368 748.46 81 6 123.177 24.344 16.286 3.48 18.524 3.333 13.238 11.345 747.68 81 7 123.177 24.344 14.921 3.879 17.003 3.737 11.47 13.045 751.57 81 8 123.177 24.344 13.601 4.417 16.018 4.252 10.009 14.47 756.3 82 1 131.243 23.287 28.344 5.167 28.36 5.174 28.343 5.242 804.23 82 2 131.243 23.287 21.639 1.345 21.83 1.374 21.597 1.658 724.03 82 3 131.243 23.287 19.37 1.612 20.835 1.545 18.84 4.564 725.11 82 4 131.243 23.287 17.17 2.193 19.329 2.057 16.708 7.17 727.89 82 5 131.243 23.287 15.296 2.807 17.683 2.652 14.521 8.925 733.31 82 6 131.243 23.287 14.036 3.261 16.503 3.074 12.417 11.106 733.03 82 7 131.243 23.287 12.988 3.683 15.424 3.433 10.605 12.896 732.65 82 8 131.243 23.287 12.572 3.804 14.823 3.621 8.941 14.357 729.95 83 1 119.695 23.922 26.565 4.537 26.58 4.542 26.558 4.525 772.85 83 2 119.695 23.922 21.66 1.856 21.956 1.852 21.709 2.325 727.72 83 3 119.695 23.922 19.405 2.02 21.643 1.87 19.428 4.595 737.43 83 4 119.695 23.922 18.651 2.119 20.446 2.047 17.085 6.925 733.89 83 5 119.695 23.922 16.673 2.579 19.11 2.421 14.932 9.012 739.82 83 6 119.695 23.922 18.291 2.164 19.854 2.102 12.899 11.185 729.94 83 7 119.695 23.922 12.664 4.229 15.28 3.99 11.212 13.013 751.47 83 8 119.695 23.922 12.489 4.173 14.985 3.974 9.622 14.329 747.55 84 1 119.94 27.714 32.016 7.385 32.04 7.394 32.014 7.248 862.65 84 2 119.94 27.714 25 2.739 25.329 2.682 24.855 3.104 795.14 84 3 119.94 27.714 22.927 2.864 24.412 2.868 22.28 5.756 800.07 84 4 119.94 27.714 20.89 3.144 23.458 3.056 19.869 8.309 806.12 84 5 119.94 27.714 18.966 3.589 22.246 3.394 17.451 10.843 813.82 84 6 119.94 27.714 17.504 4.014 20.595 3.824 15.168 13.203 816.52 84 7 119.94 27.714 15.745 4.657 19.252 4.327 12.968 15.424 821.44 84 8 119.94 27.714 14.983 4.944 18.213 4.648 11.039 17.188 820.37 85 1 123.053 24.333 40.194 16.324 40.267 16.376 40.222 16.323 972.78 85 2 123.053 24.333 21.702 2.379 21.762 2.384 21.711 2.567 724.27 85 3 123.053 24.333 19.02 3.081 19.997 2.996 19.018 5.375 722.7 85 4 123.053 24.333 17.165 3.375 19.245 3.254 16.702 7.691 727.34 85 5 123.053 24.333 15.649 3.855 18.042 3.648 14.467 9.963 726.89 85 6 123.053 24.333 15.146 4.008 17.256 3.872 12.531 11.984 722.24 85 7 123.053 24.333 12.579 5.115 14.927 4.882 10.825 13.727 729.04 85 8 123.053 24.333 11.883 5.478 14.071 5.257 9.112 15.263 724.87 86 1 115.233 24.314 23.062 1.928 23.07 1.928 23.059 1.852 705.15 86 2 115.233 24.314 21.367 2.002 22.466 1.998 20.938 3.931 712.71 86 3 115.233 24.314 19.549 2.192 21.553 2.117 18.935 5.914 721.64 86 4 115.233 24.314 19.046 2.294 20.906 2.247 16.936 7.888 719.73 86 5 115.233 24.314 16.759 2.742 19.409 2.621 14.903 10.002 733.86 86 6 115.233 24.314 15.814 3.001 18.504 2.921 12.949 11.847 736.5 86 7 115.233 24.314 15.208 3.191 17.695 3.047 11.307 13.108 736.42 86 8 115.233 24.314 15.334 3.141 17.553 2.987 9.824 14.748 732.72 87 1 127.341 24.882 28.642 3.081 28.658 3.085 28.635 3.089 809.12 87 2 127.341 24.882 22.832 1.661 23.032 1.668 22.662 2.275 750.17 87 3 127.341 24.882 20.594 1.922 22.211 1.801 20.168 4.848 758.8 87 4 127.341 24.882 20.161 1.884 21.731 1.827 18.175 6.823 759.06 87 5 127.341 24.882 17.653 2.458 19.864 2.356 16.193 8.839 770.52 87 6 127.341 24.882 16.13 2.923 19.151 2.702 14.334 10.768 777.5 87 7 127.341 24.882 14.043 3.688 16.958 3.455 12.311 12.807 792.95 87 8 127.341 24.882 14.334 3.471 17.012 3.252 10.579 14.491 784.26 88 1 120.448 25.94 40.273 16.37 40.326 16.406 40.274 16.302 973.18 88 2 120.448 25.94 24.07 1.926 24.17 1.931 24 1.991 772.27 88 3 120.448 25.94 22.158 2.04 23.775 2 21.662 4.334 780.8 88 4 120.448 25.94 20.805 2.252 22.775 2.176 19.268 6.659 783.73 88 5 120.448 25.94 19.469 2.512 21.903 2.399 17.014 8.923 787.43 88 6 120.448 25.94 18.497 2.736 21.115 2.582 14.859 11.069 789.72 88 7 120.448 25.94 18.053 2.847 20.027 2.75 13.015 12.967 790.34 88 8 120.448 25.94 15.784 3.523 18.804 3.301 11.324 14.742 800.92 89 1 121.143 24.16 40.61 18.676 40.662 18.712 40.598 18.664 976.76 89 2 121.143 24.16 21.964 2.151 22.045 2.147 21.903 2.352 727.36 89 3 121.143 24.16 20.014 2.509 20.879 2.462 19.426 4.836 726.5 89 4 121.143 24.16 17.795 3.066 19.999 2.93 17.312 6.947 738.19 89 5 121.143 24.16 17.25 3.073 19.33 2.961 15.27 9.036 736.34 89 6 121.143 24.16 15.606 3.526 18.236 3.344 13.35 10.931 745.78 89 7 121.143 24.16 15.183 3.588 17.54 3.45 11.734 12.488 745.82 89 8 121.143 24.16 15.028 3.635 17.431 3.471 9.964 14.239 743.29 90 1 126.225 23.818 57.988 33.874 58.099 33.957 57.979 33.983 1148.28 90 2 126.225 23.818 22.055 2.012 22.154 2.089 21.883 1.949 730 90 3 126.225 23.818 20.573 2.011 21.833 1.98 19.823 4.147 737.79 90 4 126.225 23.818 18.457 2.292 21.093 2.125 17.784 6.173 751.08 90 5 126.225 23.818 17.765 2.395 20.218 2.234 15.704 8.244 751.82 90 6 126.225 23.818 17.127 2.491 19.759 2.344 13.515 10.412 753.82 90 7 126.225 23.818 13.54 3.571 17.206 3.17 11.753 12.087 779.31 90 8 126.225 23.818 13.785 3.443 16.735 3.18 10.135 13.735 771.41 > > > >