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<-3 > 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="")) + } 21 1 114.788 22.223 48.902 30.791 49.049 30.91 48.965 30.737 1067.62 21 2 114.788 22.223 27.576 8.471 28.109 8.795 27.655 8.216 845.34 21 3 114.788 22.223 21.661 6.461 22.213 6.654 21.506 7.095 775.52 21 4 114.788 22.223 18.221 5.133 19.03 5.284 18.004 6.744 749.19 21 5 114.788 22.223 16.626 4.778 17.831 4.869 15.616 7.403 731.9 21 6 114.788 22.223 15.16 4.898 17.046 4.803 13.508 9.531 738.97 21 7 114.788 22.223 12.901 5.504 15.512 5.359 11.384 11.731 752.33 21 8 114.788 22.223 11.087 6.115 14.173 5.947 9.729 13.196 766.25 22 1 126.035 27.197 51.08 29.217 51.179 29.29 51.081 29.186 1087.14 22 2 126.035 27.197 38.923 17.801 40.031 18.55 39.157 18.303 1020.79 22 3 126.035 27.197 29.144 11.378 30.483 12.031 28.98 11.595 935.87 22 4 126.035 27.197 24.895 7.665 26.154 8.006 24.403 6.514 892.02 22 5 126.035 27.197 21.667 7.011 24.318 7.405 20.438 9.991 891.24 22 6 126.035 27.197 20.029 7.112 22.198 7.338 17.215 11.631 885.42 22 7 126.035 27.197 17.599 7.325 20.209 7.388 14.594 13.79 888.84 22 8 126.035 27.197 18.872 7.095 20.989 7.277 12.665 15.831 877.66 23 1 126.848 24.585 33.699 11.007 33.722 11.019 33.696 11.044 887.31 23 2 126.848 24.585 27.342 7.318 27.904 7.652 27.529 8.007 840.63 23 3 126.848 24.585 22.746 4.418 23.286 4.497 22.417 4.816 796.25 23 4 126.848 24.585 20.286 4.076 22.028 4.034 19.954 6.133 800.22 23 5 126.848 24.585 18.934 3.994 20.732 3.889 17.361 9.049 796.59 23 6 126.848 24.585 17.116 4.212 19.593 4.041 15.083 10.869 806.83 23 7 126.848 24.585 15.997 4.417 18.521 4.275 12.973 12.208 807.33 23 8 126.848 24.585 14.283 4.933 17.14 4.716 10.92 13.961 818.16 24 1 120.14 27.249 27.425 2.471 27.437 2.473 27.425 2.405 788.35 24 2 120.14 27.249 23.616 2.911 24.024 2.916 23.434 4.659 764.78 24 3 120.14 27.249 22.191 2.949 23.315 2.945 20.735 7.109 768.03 24 4 120.14 27.249 19.044 3.875 21.741 3.764 18.307 9.618 775.99 24 5 120.14 27.249 19.325 3.473 21.501 3.428 16.073 11.778 772.44 24 6 120.14 27.249 15.065 5.262 18.501 5 13.841 13.988 788.97 24 7 120.14 27.249 15.256 4.876 17.942 4.757 11.947 15.859 784.4 24 8 120.14 27.249 15.577 4.606 17.866 4.509 10.332 17.511 783.03 25 1 123.275 25.165 40.699 18.454 40.752 18.487 40.697 18.563 978.04 25 2 123.275 25.165 29.392 10.443 31.275 11.732 30.262 12.198 913.17 25 3 123.275 25.165 23.055 6.876 23.404 6.927 22.802 7.921 800.31 25 4 123.275 25.165 20.214 6.844 21.546 7.126 19.592 8.966 791.9 25 5 123.275 25.165 17.865 6.962 20.041 7.305 16.761 10.833 790.22 25 6 123.275 25.165 15.668 7.293 17.698 7.415 14.491 12.433 787.19 25 7 123.275 25.165 15.419 7.11 17.505 7.185 12.684 13.859 783.09 25 8 123.275 25.165 12.297 8.167 15.481 8.005 10.799 15.376 800.98 26 1 127.203 25.314 35.858 12.906 35.891 12.928 35.862 12.99 917.28 26 2 127.203 25.314 26.745 4.637 27.255 4.716 26.807 4.847 829.92 26 3 127.203 25.314 23.455 3.297 24.92 3.331 23.529 3.761 824.56 26 4 127.203 25.314 20.893 3.188 23.032 3.158 20.421 6.683 822.22 26 5 127.203 25.314 17.994 3.881 20.308 3.759 17.667 9.216 819.43 26 6 127.203 25.314 17.289 3.796 19.802 3.71 15.305 10.982 817.24 26 7 127.203 25.314 15.796 4.214 18.81 4.048 13.049 13.187 816.72 26 8 127.203 25.314 15.568 4.114 18.425 3.957 10.804 15.291 816.65 27 1 127.398 25.918 75.801 51.611 76.803 52.562 76.429 52.771 1285.04 27 2 127.398 25.918 39.317 15.441 39.615 15.63 39.236 15.4 1009.4 27 3 127.398 25.918 29.957 11.095 30.898 11.709 29.993 12.59 935.26 27 4 127.398 25.918 21.788 5.67 22.267 5.583 21.641 7.372 823.01 27 5 127.398 25.918 19.316 5.225 20.778 5.26 18.409 9.876 822.02 27 6 127.398 25.918 16.469 6.185 18.296 6.136 15.896 10.948 816.88 27 7 127.398 25.918 14.882 6.534 17.216 6.398 13.565 13.101 814.33 27 8 127.398 25.918 14.85 6.192 17.4 6.109 11.693 14.923 813.74 28 1 114.095 21.368 55.612 36.673 55.824 36.848 55.679 36.602 1129.76 28 2 114.095 21.368 22.975 4.563 23.05 4.6 22.866 4.379 750.13 28 3 114.095 21.368 19.146 4.338 19.513 4.387 19.115 5.421 712.67 28 4 114.095 21.368 16.703 4.449 17.395 4.498 16.483 6.652 698.64 28 5 114.095 21.368 15.322 4.357 17.212 4.396 14.254 8.589 704.68 28 6 114.095 21.368 13.031 4.987 15.4 4.913 12.247 10.291 708.44 28 7 114.095 21.368 14.553 4.185 16.486 4.152 10.37 11.965 707.59 28 8 114.095 21.368 12.486 4.635 14.721 4.45 8.744 13.451 713.47 29 1 122.799 23.773 29.891 8.573 29.912 8.584 29.889 8.609 829.57 29 2 122.799 23.773 22.693 3.363 22.989 3.41 22.739 4.084 749.4 29 3 122.799 23.773 19.597 3.033 20.072 3.044 19.35 4.635 720.29 29 4 122.799 23.773 18.04 3.205 19.776 3.136 17.282 6.732 727.69 29 5 122.799 23.773 16.381 3.483 18.904 3.337 15.134 8.891 739.51 29 6 122.799 23.773 16.372 3.418 18.407 3.322 13.095 11.119 733.7 29 7 122.799 23.773 14.957 3.737 17.472 3.56 11.423 12.682 741.57 29 8 122.799 23.773 14.841 3.778 17.187 3.663 9.84 13.941 738.69 30 1 128.634 22.555 30.597 10.034 30.619 10.047 30.59 10.189 840.69 30 2 128.634 22.555 20.563 3.577 20.721 3.604 20.465 4.037 693.94 30 3 128.634 22.555 18.889 3.342 20.036 3.437 18.075 5.883 695.71 30 4 128.634 22.555 16.36 3.587 18.133 3.523 15.703 7.507 695.93 30 5 128.634 22.555 15.801 3.576 17.627 3.495 13.768 9.556 693.38 30 6 128.634 22.555 13.282 4.391 15.338 4.31 11.875 11.231 696.1 30 7 128.634 22.555 11.377 5.246 14.053 5.027 10.052 12.692 701.4 30 8 128.634 22.555 12.312 4.557 14.031 4.421 8.544 14.333 692.82 > > > >