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<-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 123.37 24.011 56.743 29.979 56.941 30.132 56.772 29.845 1138.32 61 2 123.37 24.011 21.74 2.373 21.822 2.425 21.649 2.432 723.42 61 3 123.37 24.011 19.701 2.552 21.386 2.408 19.219 4.852 726.13 61 4 123.37 24.011 17.628 3.078 19.628 2.963 17.115 7.057 734.31 61 5 123.37 24.011 16.763 3.244 18.845 3.12 15.092 9.013 734.54 61 6 123.37 24.011 15.51 3.563 18.265 3.339 13.049 11.182 739.91 61 7 123.37 24.011 14.091 4.031 16.859 3.792 11.189 12.922 747.66 61 8 123.37 24.011 13.319 4.295 15.828 4.088 9.561 14.476 750.72 62 1 120.793 25.277 29.002 6.558 29.017 6.563 28.993 6.535 815.08 62 2 120.793 25.277 22.826 2.402 23.008 2.415 22.775 2.738 747.8 62 3 120.793 25.277 20.807 2.582 22.073 2.567 20.19 5.328 755.43 62 4 120.793 25.277 19.275 2.794 21.585 2.703 17.911 7.49 761.54 62 5 120.793 25.277 18.938 2.709 21.123 2.589 15.896 9.602 764.31 62 6 120.793 25.277 16.053 3.577 18.826 3.365 14.17 11.429 775.22 62 7 120.793 25.277 14.997 3.9 17.876 3.652 12.402 13.15 781.41 62 8 120.793 25.277 15.359 3.595 17.972 3.377 10.731 14.715 775.9 63 1 119.375 25.17 66.677 51.661 67.433 52.413 67.182 52.59 1223.31 63 2 119.375 25.17 22.276 3.059 22.318 3.061 22.254 3.027 736.07 63 3 119.375 25.17 19.524 3.463 20.637 3.418 19.534 5.734 738.45 63 4 119.375 25.17 17.71 3.867 19.292 3.799 17.106 8.335 739.39 63 5 119.375 25.17 16.782 4.056 19.109 3.902 14.856 10.548 740.77 63 6 119.375 25.17 15.147 4.601 17.769 4.395 13.058 12.253 744.08 63 7 119.375 25.17 13.55 5.154 16.294 4.915 11.218 14.238 748.98 63 8 119.375 25.17 11.613 6.13 14.395 5.823 9.454 15.898 754.76 64 1 117.992 22.466 43.455 26.093 43.547 26.172 43.474 26.135 1010.05 64 2 117.992 22.466 20.291 2.6 20.371 2.673 20.136 2.333 690.17 64 3 117.992 22.466 18.694 2.778 19.66 2.731 17.862 4.6 693.68 64 4 117.992 22.466 17.213 3.032 18.807 2.995 16.067 6.422 699.7 64 5 117.992 22.466 16.354 3.133 18.374 3.029 14.244 8.202 705.1 64 6 117.992 22.466 16.237 3.172 18.017 3.085 12.639 9.858 704.94 64 7 117.992 22.466 14.848 3.499 16.748 3.384 11.001 11.447 713.58 64 8 117.992 22.466 12.867 4 15.609 3.738 9.414 12.942 726.49 65 1 119.765 24.116 38.028 15.601 38.082 15.638 38.036 15.652 945.68 65 2 119.765 24.116 21.935 1.982 22.056 1.925 21.941 2.268 727.41 65 3 119.765 24.116 20.133 2.117 21.61 2.059 19.703 4.559 736.28 65 4 119.765 24.116 18.258 2.401 20.423 2.294 17.631 6.693 747.75 65 5 119.765 24.116 17.228 2.574 19.586 2.442 15.459 8.676 749.49 65 6 119.765 24.116 15.511 3.008 18.682 2.712 13.6 10.627 760.07 65 7 119.765 24.116 17.835 2.466 19.275 2.399 11.625 12.643 737.91 65 8 119.765 24.116 13.33 3.794 16.141 3.51 10.004 14.218 767.04 66 1 131.553 24.3 28.162 5.024 28.174 5.029 28.157 5.117 800.93 66 2 131.553 24.3 23.034 1.742 23.219 1.713 22.717 1.781 751.8 66 3 131.553 24.3 21.08 1.874 22.685 1.836 20.438 4.064 763.75 66 4 131.553 24.3 20.09 2.026 21.836 1.95 18.243 6.215 765.43 66 5 131.553 24.3 17.811 2.421 20.479 2.28 16.045 8.327 776.93 66 6 131.553 24.3 15.472 3.138 18.494 2.855 14.135 10.342 788.26 66 7 131.553 24.3 14.771 3.319 17.84 3.136 12.119 12.246 785.89 66 8 131.553 24.3 13.575 3.804 16.905 3.495 10.234 14.219 789.83 67 1 122.747 25.641 39.477 17.634 39.533 17.675 39.488 17.648 963.57 67 2 122.747 25.641 23.396 2.194 23.53 2.171 23.409 2.32 756.31 67 3 122.747 25.641 21.916 2.306 22.845 2.276 20.697 4.979 758.34 67 4 122.747 25.641 19.554 2.708 21.44 2.615 18.397 7.395 767.03 67 5 122.747 25.641 18.066 3.029 20.79 2.846 16.11 9.664 772.1 67 6 122.747 25.641 18.43 2.887 20.529 2.77 14.131 11.563 769.86 67 7 122.747 25.641 17.006 3.293 19.205 3.171 12.158 13.522 776.13 67 8 122.747 25.641 16.609 3.414 18.716 3.275 10.484 15.258 774.98 68 1 128.512 25.271 28.147 5.563 28.16 5.567 28.144 5.64 800.86 68 2 128.512 25.271 23.073 2.175 23.265 2.182 23.02 2.315 751.76 68 3 128.512 25.271 20.859 2.373 22.15 2.349 20.553 4.783 762.35 68 4 128.512 25.271 20.083 2.382 21.712 2.352 18.468 6.871 760.58 68 5 128.512 25.271 18.974 2.548 21.24 2.443 16.3 9.127 766.23 68 6 128.512 25.271 17.596 2.855 20.324 2.71 14.358 11.34 772.11 68 7 128.512 25.271 14.881 3.61 18.478 3.305 12.442 12.964 794.35 68 8 128.512 25.271 16.38 3.192 18.794 3.042 10.53 14.816 776.07 69 1 125.274 23.701 41.754 17.33 41.836 17.39 41.77 17.364 991 69 2 125.274 23.701 21.586 2.004 21.632 1.992 21.555 2.28 720.57 69 3 125.274 23.701 20.099 2.094 21.469 2.038 19.284 4.602 726.7 69 4 125.274 23.701 18.377 2.268 20.479 2.164 17.187 6.778 735.99 69 5 125.274 23.701 17.776 2.372 19.864 2.267 15.231 8.732 738.67 69 6 125.274 23.701 16.665 2.565 18.963 2.455 13.612 10.267 743.97 69 7 125.274 23.701 13.462 3.631 16.814 3.351 11.885 12.04 766.19 69 8 125.274 23.701 13.811 3.409 16.507 3.226 10.42 13.432 758.94 70 1 124.917 23.443 35.318 13.649 35.358 13.675 35.325 13.745 909.96 70 2 124.917 23.443 21.157 1.983 21.267 2.001 21.164 2.229 710.69 70 3 124.917 23.443 18.758 2.463 19.849 2.394 18.326 5.06 706.85 70 4 124.917 23.443 16.221 3.41 17.567 3.382 15.999 7.401 704.54 70 5 124.917 23.443 14.857 3.762 16.895 3.616 14.046 9.359 707.37 70 6 124.917 23.443 14.024 3.876 16.437 3.685 12.366 11.151 710.12 70 7 124.917 23.443 13.496 3.965 15.894 3.766 10.776 12.826 712.62 70 8 124.917 23.443 13.045 4.093 15.144 3.936 9.223 14.301 713.17 > > > >