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<-6 > 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="")) + } 51 1 133.103 24.84 71.96 42.606 72.043 42.643 71.887 42.732 1250.93 51 2 133.103 24.84 22.022 2.494 22.049 2.493 22 2.75 729.51 51 3 133.103 24.84 19.703 2.961 20.817 2.827 19.289 5.504 725.68 51 4 133.103 24.84 17.601 3.599 18.749 3.524 16.794 8.019 721.58 51 5 133.103 24.84 15.776 4.181 18 4.007 14.689 10.072 726.14 51 6 133.103 24.84 15.85 3.992 17.8 3.858 12.794 12.03 724.54 51 7 133.103 24.84 13.919 4.783 16.331 4.567 10.949 13.914 726.75 51 8 133.103 24.84 11.941 5.65 14.322 5.417 9.166 15.699 732.35 52 1 126.09 27.215 35.623 11.117 35.656 11.135 35.617 11.131 913.94 52 2 126.09 27.215 25.286 1.957 25.394 1.963 25.212 2.101 794.67 52 3 126.09 27.215 23.531 2.019 24.871 1.984 22.508 4.706 799.47 52 4 126.09 27.215 20.98 2.446 23.321 2.327 19.96 7.445 810.18 52 5 126.09 27.215 20.172 2.616 22.61 2.472 17.798 9.596 807.92 52 6 126.09 27.215 18.457 3.095 21.273 2.924 15.59 11.957 813.48 52 7 126.09 27.215 16.653 3.672 19.938 3.389 13.651 13.559 823.18 52 8 126.09 27.215 15.888 3.961 18.808 3.733 11.702 15.875 821.95 53 1 122.014 22.601 21.554 1.526 21.559 1.526 21.549 1.568 672.65 53 2 122.014 22.601 19.417 1.801 20.225 1.796 19.129 3.992 675.67 53 3 122.014 22.601 18.049 1.964 19.92 1.903 17.079 6.107 679.88 53 4 122.014 22.601 15.933 2.585 18.222 2.473 14.982 8.155 685.73 53 5 122.014 22.601 14.289 3.207 16.896 3.07 13.297 9.766 691.26 53 6 122.014 22.601 14.196 2.943 16.594 2.798 11.807 11.279 690.01 53 7 122.014 22.601 12.62 3.652 15.416 3.432 10.312 12.669 697.25 53 8 122.014 22.601 11.982 3.858 14.481 3.676 8.794 14.115 698.3 54 1 117.259 23.699 25.905 7.444 25.918 7.45 25.898 7.526 760.73 54 2 117.259 23.699 21.176 2.744 21.354 2.742 20.965 2.881 707.26 54 3 117.259 23.699 19.545 2.844 20.898 2.813 18.726 5.209 717.38 54 4 117.259 23.699 17.118 3.387 18.804 3.283 16.309 7.719 726.71 54 5 117.259 23.699 16.933 3.231 18.867 3.147 14.518 9.459 727.23 54 6 117.259 23.699 15.254 3.661 17.671 3.516 12.728 11.28 735.41 54 7 117.259 23.699 16.361 3.282 18.127 3.189 11.098 12.742 729.38 54 8 117.259 23.699 14.408 3.809 16.619 3.663 9.765 14.154 736.81 55 1 121.573 25.604 39.842 15.159 39.894 15.194 39.839 15.073 967.73 55 2 121.573 25.604 23.324 2.407 23.444 2.449 23.176 2.452 756.99 55 3 121.573 25.604 21.579 2.454 23.167 2.428 20.728 4.884 763.88 55 4 121.573 25.604 19.904 2.654 22.028 2.545 18.392 7.171 769.63 55 5 121.573 25.604 18.109 2.994 20.708 2.821 16.356 9.286 778.35 55 6 121.573 25.604 17.064 3.252 19.878 3.035 14.256 11.624 779.81 55 7 121.573 25.604 15.763 3.609 18.803 3.358 12.07 13.59 785.23 55 8 121.573 25.604 12.972 4.765 16.209 4.379 10.242 15.557 804.51 56 1 119.638 25.958 36.705 13.501 36.749 13.531 36.718 13.458 928.73 56 2 119.638 25.958 23.958 2.123 24.163 2.223 23.915 2.002 772.12 56 3 119.638 25.958 21.317 2.661 22.336 2.726 21.064 4.967 774.93 56 4 119.638 25.958 20.937 2.587 22.515 2.582 18.664 7.36 776.86 56 5 119.638 25.958 19.997 2.743 21.706 2.679 16.303 9.919 779.05 56 6 119.638 25.958 18.825 3.02 20.752 2.927 14.442 11.765 784.01 56 7 119.638 25.958 16.259 3.722 18.856 3.566 12.601 13.745 792.94 56 8 119.638 25.958 16.241 3.693 18.722 3.546 10.769 15.193 794.03 57 1 127.724 23.077 22.822 2.768 22.828 2.769 22.819 2.799 700.02 57 2 127.724 23.077 20.747 2.433 22.207 2.413 20.547 4.886 709.3 57 3 127.724 23.077 19.375 2.22 20.664 2.188 18.19 7.012 706.55 57 4 127.724 23.077 18.391 2.314 20.126 2.244 16.279 7.43 705.42 57 5 127.724 23.077 15.464 3.119 18.117 2.958 14.495 9.135 725.72 57 6 127.724 23.077 15.444 2.973 17.571 2.86 12.717 10.909 717.88 57 7 127.724 23.077 13.58 3.597 16.133 3.41 11.061 12.665 729.68 57 8 127.724 23.077 13.557 3.482 16.017 3.295 9.593 13.805 725.24 58 1 124.377 23.679 25.32 2.188 25.332 2.19 25.317 2.192 749.91 58 2 124.377 23.679 21.083 1.686 21.516 1.666 20.933 2.868 713.34 58 3 124.377 23.679 18.492 2.133 20.088 2.01 18.277 5.534 710.79 58 4 124.377 23.679 16.524 2.978 17.914 2.87 15.732 8.23 698.17 58 5 124.377 23.679 15.16 3.429 16.967 3.338 13.779 10.118 697.71 58 6 124.377 23.679 13.407 4.311 15.372 4.168 12.01 11.99 698.47 58 7 124.377 23.679 13.557 3.97 15.226 3.858 10.402 13.452 698.53 58 8 124.377 23.679 11.499 5.109 13.613 4.905 8.968 14.788 706.4 59 1 121.395 24.179 35.313 15.833 35.351 15.861 35.308 15.858 909.71 59 2 121.395 24.179 21.452 2.893 21.566 2.946 21.468 3.144 718.41 59 3 121.395 24.179 19.28 3.043 20.743 2.988 19.13 5.248 725.88 59 4 121.395 24.179 18.104 3.225 19.953 3.125 16.83 7.389 725.43 59 5 121.395 24.179 16.839 3.561 18.795 3.466 14.878 9.447 726.76 59 6 121.395 24.179 14.562 4.337 17.612 4.063 12.998 11.296 738.09 59 7 121.395 24.179 13.544 4.622 16.128 4.425 11.371 13.238 744.85 59 8 121.395 24.179 14.567 4.176 16.855 4.032 9.783 14.663 734.76 60 1 120.974 30.589 48.537 22.612 48.606 22.655 48.498 22.631 1061.74 60 2 120.974 30.589 27.521 3.504 27.591 3.462 27.437 3.43 835.73 60 3 120.974 30.589 25.571 3.553 27.167 3.486 24.497 6.504 841.87 60 4 120.974 30.589 24.017 3.717 26.305 3.571 21.861 8.877 846.17 60 5 120.974 30.589 21.534 4.148 24.561 4.012 19.136 11.558 856.07 60 6 120.974 30.589 21.096 4.216 24.122 4.043 16.493 14.382 854.49 60 7 120.974 30.589 18.328 4.976 21.668 4.704 14.296 16.524 864.38 60 8 120.974 30.589 15.94 5.913 19.378 5.634 11.745 19.107 873.81 > > > >