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<-5 > 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="")) + } 41 1 133.974 23.308 27.886 6.152 27.901 6.158 27.885 6.286 796.35 41 2 133.974 23.308 23.443 3.683 24.418 3.905 23.339 4.994 774.27 41 3 133.974 23.308 20.676 2.425 21.909 2.471 20.258 4.321 758.98 41 4 133.974 23.308 18.243 2.736 20.42 2.683 17.833 6.622 765.66 41 5 133.974 23.308 16.892 2.982 18.876 2.929 15.653 8.62 758.95 41 6 133.974 23.308 17.189 2.747 19.166 2.675 13.604 10.585 752.7 41 7 133.974 23.308 13.003 4.376 15.857 4.171 11.909 12.213 775.28 41 8 133.974 23.308 11.93 4.758 14.79 4.523 9.998 14.033 773.58 42 1 120.896 23.429 48.048 26.442 48.13 26.505 48.03 26.34 1057.71 42 2 120.896 23.429 32.864 13.26 33.108 13.415 32.824 13.34 924.34 42 3 120.896 23.429 26.055 6.443 27.155 6.904 26.02 6.604 877.15 42 4 120.896 23.429 20.69 4.275 21.213 4.382 20.359 4.85 808.73 42 5 120.896 23.429 18.749 4.259 20.431 4.194 17.797 7.66 802.61 42 6 120.896 23.429 17.742 4.272 19.432 4.337 15.331 9.945 807.09 42 7 120.896 23.429 16.774 4.29 18.777 4.236 13.293 11.152 813.48 42 8 120.896 23.429 14.341 5.028 16.741 4.916 11.598 12.727 826.54 43 1 128.433 25.235 75.278 49.354 84.319 57.884 82.651 57.176 1365.43 43 2 128.433 25.235 33.28 11.9 33.4 11.993 33.204 11.951 928.05 43 3 128.433 25.235 26.521 6.499 27.094 6.805 26.365 6.929 872.29 43 4 128.433 25.235 23.057 4.814 24.427 4.959 22.763 6.097 869.9 43 5 128.433 25.235 20.749 4.473 22.977 4.647 19.864 8.965 869.67 43 6 128.433 25.235 18.736 4.585 21.78 4.533 16.904 10.137 872.84 43 7 128.433 25.235 18.843 4.486 21.516 4.521 14.605 12.035 868.33 43 8 128.433 25.235 16.925 4.759 19.938 4.662 12.553 14.461 873.54 44 1 120.842 24.622 27.32 4.491 27.336 4.495 27.322 4.458 786.69 44 2 120.842 24.622 23.474 3.457 23.868 3.535 23.39 4.577 762.75 44 3 120.842 24.622 20.615 3.734 22.055 3.887 20.304 7.057 765.58 44 4 120.842 24.622 17.999 4.542 19.352 4.681 17.655 9.033 759.5 44 5 120.842 24.622 18.174 3.797 19.863 3.852 15.418 10.941 760.99 44 6 120.842 24.622 16.496 4.167 18.779 4.216 13.578 12.442 765.42 44 7 120.842 24.622 15.483 4.362 17.72 4.351 11.883 13.344 768.46 44 8 120.842 24.622 16.154 4.012 18.152 3.965 10.007 15.312 765.38 45 1 123.853 23.867 29.601 7.076 29.621 7.085 29.603 7.08 825.12 45 2 123.853 23.867 23.88 3.857 24.176 3.901 23.799 4.068 773.77 45 3 123.853 23.867 21.146 3.066 22.205 3.027 20.373 5.382 764.92 45 4 123.853 23.867 19.954 3.05 21.411 3.092 18.138 7.263 762.93 45 5 123.853 23.867 17.779 3.421 20.176 3.312 16.079 9.41 769.57 45 6 123.853 23.867 16.041 3.728 18.895 3.576 14.075 11.234 778 45 7 123.853 23.867 13.912 4.411 16.57 4.286 11.968 12.614 789.69 45 8 123.853 23.867 12.419 4.905 15.765 4.74 10.261 14.385 797.75 46 1 121.893 24.526 48.753 25.566 48.88 25.668 48.82 25.608 1065.78 46 2 121.893 24.526 26.627 7.796 26.751 7.843 26.656 8.244 822.95 46 3 121.893 24.526 21.938 5.118 22.387 5.153 21.926 6.477 783 46 4 121.893 24.526 20.906 4.628 22.329 4.853 19.447 8.739 785.99 46 5 121.893 24.526 18.842 4.776 21.234 4.795 17.388 9.638 797.91 46 6 121.893 24.526 17.37 4.91 20.532 4.833 14.986 12.17 805.56 46 7 121.893 24.526 17.765 4.575 20.089 4.559 13.005 12.373 797.36 46 8 121.893 24.526 16.047 4.803 18.381 4.829 11.29 14.221 806.22 47 1 123.298 25.368 63.966 43.009 64.2 43.207 64.027 43.275 1196.72 47 2 123.298 25.368 41.724 22.382 42.326 22.896 41.939 22.813 1044.8 47 3 123.298 25.368 24.042 5.881 24.234 5.937 23.776 6.137 819.84 47 4 123.298 25.368 21.269 5.045 21.889 5.027 20.628 7.059 811.46 47 5 123.298 25.368 18.887 5.114 20.811 5.165 17.677 9.424 813.45 47 6 123.298 25.368 16.093 6.025 17.511 6.132 14.624 12.631 802.13 47 7 123.298 25.368 13.527 7.496 15.895 7.428 12.238 14.815 789.75 47 8 123.298 25.368 15.652 5.542 17.432 5.555 10.511 16.231 811.88 48 1 119.615 24.453 39.272 17.832 39.325 17.87 39.264 17.885 960.46 48 2 119.615 24.453 26.58 7.364 26.76 7.447 26.593 7.568 821.74 48 3 119.615 24.453 21.107 3.868 22.026 3.7 20.935 5.174 767.29 48 4 119.615 24.453 19.455 3.843 21.192 3.813 18.448 7.632 765.61 48 5 119.615 24.453 16.66 4.452 19.432 4.172 15.828 9.887 772.06 48 6 119.615 24.453 18.271 3.883 19.868 3.792 13.684 11.941 762.46 48 7 119.615 24.453 13.983 5.319 16.489 5.182 11.853 13.586 769.04 48 8 119.615 24.453 13.054 5.671 15.484 5.409 10.077 15.404 770.07 49 1 131.995 27.928 45.717 17.331 45.775 17.366 45.72 17.45 1033.61 49 2 131.995 27.928 31.788 6.872 31.954 6.939 31.503 7.294 905.08 49 3 131.995 27.928 26.952 5.793 28 6.156 26.665 7.143 895.4 49 4 131.995 27.928 23.75 4.779 25.303 5.013 23.348 7.716 886.28 49 5 131.995 27.928 21.722 4.522 24.265 4.584 20.127 9.93 885 49 6 131.995 27.928 18.878 5.041 22.089 4.942 16.917 12.152 880.57 49 7 131.995 27.928 18.9 4.81 21.729 4.621 14.498 14.444 878.7 49 8 131.995 27.928 15.531 5.986 18.823 5.717 12.464 16.38 877.45 50 1 122.789 25.172 26.965 3.762 26.979 3.765 26.95 3.806 779.85 50 2 122.789 25.172 23.741 2.988 25.054 3.119 23.743 4.437 780.62 50 3 122.789 25.172 21.313 2.943 23.25 2.957 20.915 6.19 777.87 50 4 122.789 25.172 19.467 3.169 21.61 3.227 18.354 8.22 774.59 50 5 122.789 25.172 18.079 3.432 20.153 3.342 15.951 10.598 769.57 50 6 122.789 25.172 16.61 3.81 18.879 3.734 13.926 12.23 771.02 50 7 122.789 25.172 15.097 4.335 17.497 4.202 11.841 13.243 771.2 50 8 122.789 25.172 12.245 5.618 15.021 5.331 10.079 15.465 785.88 > > > >