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<-4 > KS<-1 > 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="")) + } 1 1 120.289 26.375 42.987 20.714 43.042 20.75 42.995 20.648 1004.57 1 2 120.289 26.375 31.342 10.948 31.722 11.155 31.383 11.291 903.85 1 3 120.289 26.375 25.311 6.178 25.925 6.407 25.166 5.901 853.91 1 4 120.289 26.375 21.76 5.213 22.538 5.258 21.408 7.344 828.94 1 5 120.289 26.375 19.707 5.317 22.267 5.21 18.432 10.462 837.86 1 6 120.289 26.375 18.871 5.221 21.163 5.109 15.705 12.542 831.36 1 7 120.289 26.375 17.3 5.511 19.706 5.369 13.765 14.604 835.28 1 8 120.289 26.375 14.185 6.746 17.173 6.523 11.777 16.116 851.17 2 1 127.294 25.157 25.876 3.901 25.887 3.903 25.872 3.929 760.17 2 2 127.294 25.157 23.903 3.414 24.865 3.578 23.164 5.175 762.85 2 3 127.294 25.157 21.439 3.406 23.741 3.446 20.663 7.507 771.34 2 4 127.294 25.157 20.957 3.232 22.59 3.25 18.413 8.743 765.49 2 5 127.294 25.157 19.349 3.388 21.64 3.442 16.073 10.55 771.99 2 6 127.294 25.157 17.618 3.696 19.784 3.635 13.887 12.396 776.75 2 7 127.294 25.157 15.949 4.134 18.571 4.043 12.073 13.632 780.39 2 8 127.294 25.157 14.136 4.738 17.013 4.577 10.211 16 787.79 3 1 124.064 28.977 53.489 26.757 53.599 26.841 53.493 26.883 1108.8 3 2 124.064 28.977 30.068 6.233 30.187 6.275 30.004 6.509 879.82 3 3 124.064 28.977 25.07 4.489 25.542 4.51 24.896 5.644 848.11 3 4 124.064 28.977 22.806 4.523 24.718 4.556 21.56 9.032 850.93 3 5 124.064 28.977 20.231 4.966 23.198 4.92 19.098 11.115 864.53 3 6 124.064 28.977 19.242 5.083 21.827 5.067 16.805 13.419 859.3 3 7 124.064 28.977 17.49 5.544 20.605 5.386 14.506 15.874 864.35 3 8 124.064 28.977 15.527 6.273 18.746 6.09 12.406 17.25 877.16 4 1 134.546 26.518 45.482 20.409 45.553 20.463 45.483 20.75 1031.38 4 2 134.546 26.518 25.161 3.512 25.631 3.812 25.396 4.33 803.98 4 3 134.546 26.518 22.81 3.342 24.821 3.394 22.637 5.92 811.32 4 4 134.546 26.518 22.022 3.218 23.871 3.206 20.03 8.422 806 4 5 134.546 26.518 20.675 3.334 22.701 3.352 17.86 10.189 808.68 4 6 134.546 26.518 18.534 3.717 21.529 3.553 15.647 12.309 819.17 4 7 134.546 26.518 16.766 4.169 20.176 3.946 13.473 13.772 825.12 4 8 134.546 26.518 13.951 5.185 17.498 4.93 11.292 15.626 842.97 5 1 123.391 23.331 36.972 12.875 37.015 12.903 36.956 12.835 931.3 5 2 123.391 23.331 24.785 3.584 24.955 3.609 24.567 4.067 776.01 5 3 123.391 23.331 20.711 3.091 21.435 3.073 20.377 4.906 750.93 5 4 123.391 23.331 18.448 3.351 20.665 3.293 17.851 7.156 758.62 5 5 123.391 23.331 17.103 3.436 19.244 3.465 15.254 9.409 759.16 5 6 123.391 23.331 16.348 3.427 18.684 3.428 13.627 11.338 760.38 5 7 123.391 23.331 13.853 4.332 17.041 4.245 11.859 12.7 776.46 5 8 123.391 23.331 14.525 3.867 17.014 3.807 10.305 14.157 761.86 6 1 128.149 24.979 62.801 38.95 63.084 39.191 62.941 39.085 1188.24 6 2 128.149 24.979 34.382 12.872 34.791 13.057 34.057 13.344 946.06 6 3 128.149 24.979 24.333 5.596 25.145 5.704 23.807 5.631 831.21 6 4 128.149 24.979 20.492 3.836 21.563 3.778 20.163 5.328 802.67 6 5 128.149 24.979 17.665 4.301 20.276 4.045 17.394 8.003 818.7 6 6 128.149 24.979 15.758 4.922 18.396 4.709 15.122 10.875 819.05 6 7 128.149 24.979 14.99 5.065 17.659 4.942 13.178 12.596 810.61 6 8 128.149 24.979 14.814 4.991 17.219 4.813 11.344 14.379 803.85 7 1 119.268 24.899 37.66 15.231 37.702 15.259 37.65 15.167 940.53 7 2 119.268 24.899 28.526 8.235 28.765 8.344 28.542 8.454 856.93 7 3 119.268 24.899 23.397 6.032 24.583 6.665 23.619 5.727 832.21 7 4 119.268 24.899 20.489 4.55 21.58 4.612 19.76 5.019 808.2 7 5 119.268 24.899 18.179 4.698 20.281 4.579 17.391 7.51 815.79 7 6 119.268 24.899 18.734 4.484 20.231 4.353 15.067 10.342 800.19 7 7 119.268 24.899 15.973 5.108 18.217 4.963 12.9 12.346 810.8 7 8 119.268 24.899 15.124 5.342 17.456 5.204 11.016 14.236 810.5 8 1 120.387 26.048 58.267 39.984 58.444 40.13 58.253 40.2 1150.55 8 2 120.387 26.048 30.821 11.112 30.954 11.18 30.64 10.915 892.45 8 3 120.387 26.048 23.997 7.548 25.302 8.033 24.322 8.67 849.38 8 4 120.387 26.048 20.09 6.198 21.072 6.345 19.988 6.6 803.88 8 5 120.387 26.048 17.9 6.346 19.298 6.381 17.019 9.519 799.86 8 6 120.387 26.048 16.973 6.367 18.846 6.282 14.772 12.036 798.12 8 7 120.387 26.048 14.409 7.119 17.05 6.958 12.619 14.231 808.9 8 8 120.387 26.048 13.964 7.194 16.644 6.976 10.427 16.282 805.77 9 1 128.107 24.958 57.126 36.096 57.281 36.225 57.161 36.469 1141.17 9 2 128.107 24.958 40.405 20.528 41.161 21.121 40.539 21.388 1029.55 9 3 128.107 24.958 30.233 12.231 31.395 12.958 29.703 13.382 935.83 9 4 128.107 24.958 20.063 4.99 20.763 5.034 19.683 5.773 803.94 9 5 128.107 24.958 18.031 5.166 19.894 5.072 16.85 8.5 805.04 9 6 128.107 24.958 15.892 5.879 17.957 5.779 14.673 10.884 808.59 9 7 128.107 24.958 14.796 6.243 17.124 6.096 12.755 12.822 807.48 9 8 128.107 24.958 13.941 6.416 16.113 6.246 11.136 14.739 811.98 10 1 126.091 22.695 42.916 19.601 42.992 19.659 42.95 19.722 1004.23 10 2 126.091 22.695 22.535 3.486 22.977 3.689 22.595 3.833 747.23 10 3 126.091 22.695 19.47 3.992 20.618 4.361 19.463 6.612 742.74 10 4 126.091 22.695 17.184 4.384 18.761 4.502 16.932 7.929 740.43 10 5 126.091 22.695 16.117 4.111 18.363 4.261 15.061 9.076 741.42 10 6 126.091 22.695 14.752 4.423 17.213 4.432 12.974 11.266 744.58 10 7 126.091 22.695 13.173 4.826 15.908 4.846 11.36 12.285 755.34 10 8 126.091 22.695 15.198 3.695 17.105 3.662 9.834 14.064 742.73 > > > >