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<-2 > 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="")) + } 11 1 126.344 24.679 39.648 17.031 39.696 17.064 39.672 17.119 965.95 11 2 126.344 24.679 23.875 2.177 23.96 2.18 23.729 2.059 769.3 11 3 126.344 24.679 21.006 2.454 22.232 2.521 20.752 4.678 772.96 11 4 126.344 24.679 19.761 2.507 21.572 2.543 18.218 7.337 771.92 11 5 126.344 24.679 18.314 2.791 20.451 2.715 16.216 9.317 775.83 11 6 126.344 24.679 15.988 3.505 18.628 3.367 14.382 11.139 785.93 11 7 126.344 24.679 17.16 2.92 19.155 2.813 12.541 12.324 777.06 11 8 126.344 24.679 13.059 4.558 16.316 4.224 10.907 14.642 801.29 12 1 121.218 22.542 21.999 0.58 22.006 0.58 21.994 0.564 682.35 12 2 121.218 22.542 19.602 0.866 20.653 0.829 19.289 3.264 682.97 12 3 121.218 22.542 16.959 1.938 18.273 1.866 16.886 5.484 680.57 12 4 121.218 22.542 16.833 1.562 18.346 1.481 15.101 7.26 680.67 12 5 121.218 22.542 15.436 2.055 17.458 1.912 13.318 9.104 681.78 12 6 121.218 22.542 13.926 2.618 16.452 2.407 11.803 10.698 688.14 12 7 121.218 22.542 13.324 2.84 15.263 2.689 10.26 12.245 688.51 12 8 121.218 22.542 12.024 3.377 14.465 3.098 8.737 13.754 696.1 13 1 116.168 26.029 30.987 9.371 31.008 9.379 30.982 9.251 847.13 13 2 116.168 26.029 24.723 5.335 24.985 5.392 24.673 5.636 786.21 13 3 116.168 26.029 22.48 4.984 24.054 5.135 21.893 6.503 790.71 13 4 116.168 26.029 21.306 4.984 23.105 5.004 19.455 6.918 790.04 13 5 116.168 26.029 18.897 5.077 21.446 5.034 17.082 11.115 798.5 13 6 116.168 26.029 17.435 5.323 20.239 5.203 14.801 12.039 799.92 13 7 116.168 26.029 17.405 5.255 19.673 5.142 12.674 14.222 794.48 13 8 116.168 26.029 15.09 5.766 17.723 5.549 10.672 16.468 801.95 14 1 126.386 24.757 56.261 33.893 56.373 33.97 56.272 33.931 1134.07 14 2 126.386 24.757 41.64 20.847 45.585 23.947 44.008 23.934 1092.23 14 3 126.386 24.757 31.579 13.549 32.293 13.902 31.612 14.482 960.78 14 4 126.386 24.757 23.587 8.891 24.459 9.178 23.504 9.678 881.65 14 5 126.386 24.757 19.146 7.576 20.069 7.718 19.018 8.416 835.28 14 6 126.386 24.757 15.888 8.234 17.24 8.32 15.56 11.333 821.35 14 7 126.386 24.757 14.547 7.965 16.317 8.132 13.322 13.007 812.72 14 8 126.386 24.757 12.626 8.596 14.664 8.538 11.026 14.61 815.73 15 1 126.102 24.012 24.078 1.723 24.086 1.724 24.068 1.726 725.5 15 2 126.102 24.012 21.538 1.685 22.649 1.742 21.5 3.299 731.53 15 3 126.102 24.012 20.065 1.786 21.934 1.741 19.329 5.362 732.94 15 4 126.102 24.012 18.845 1.93 21.141 1.876 17.113 7.247 734.75 15 5 126.102 24.012 16.879 2.288 20.228 2.037 14.922 9.431 742.81 15 6 126.102 24.012 14.692 2.946 17.515 2.764 12.954 11.334 752.54 15 7 126.102 24.012 15.635 2.554 18.276 2.377 10.992 13.258 742.92 15 8 126.102 24.012 14.93 2.752 17.318 2.545 9.373 14.749 744.35 16 1 115.244 23.796 30.963 11.014 30.988 11.03 30.962 10.994 846.37 16 2 115.244 23.796 22.154 2.943 22.312 2.974 22.042 2.669 735.34 16 3 115.244 23.796 20.426 2.929 21.713 2.916 19.353 5.302 742.28 16 4 115.244 23.796 19.309 2.948 21.062 2.963 17.094 7.571 744.18 16 5 115.244 23.796 18.408 3.016 20.273 2.905 14.866 9.201 746.39 16 6 115.244 23.796 14.258 4.277 16.756 4.104 13.048 11 758.37 16 7 115.244 23.796 13.914 4.236 16.251 4.073 11.436 12.366 759.72 16 8 115.244 23.796 13.307 4.355 15.846 4.133 9.716 14.073 759.37 17 1 125.787 23.092 35.709 12.645 35.741 12.664 35.701 12.622 915.04 17 2 125.787 23.092 23.64 3.895 23.823 3.999 23.571 3.981 765.2 17 3 125.787 23.092 20.507 3.229 21.049 3.247 20.369 4.591 746.36 17 4 125.787 23.092 18.509 3.294 20.354 3.266 17.743 7.038 751.14 17 5 125.787 23.092 16.807 3.563 18.81 3.547 15.295 8.743 754.12 17 6 125.787 23.092 16.508 3.493 18.528 3.507 13.49 10.169 750.56 17 7 125.787 23.092 15.816 3.623 17.607 3.61 11.846 11.626 752.18 17 8 125.787 23.092 14.522 3.984 16.611 3.876 10.314 13.315 752.82 18 1 123.887 23.316 46.434 27.453 46.501 27.5 46.448 27.639 1041.61 18 2 123.887 23.316 24.036 5.308 24.115 5.319 24.003 5.499 771.08 18 3 123.887 23.316 20.795 4.805 22.683 5.229 20.967 7.165 771.54 18 4 123.887 23.316 18.688 4.775 19.421 4.846 18.067 7.669 745.16 18 5 123.887 23.316 17.127 4.891 19 5 15.796 9.891 753.59 18 6 123.887 23.316 15.898 5.039 18.472 5.001 13.836 11.526 757.15 18 7 123.887 23.316 13.689 5.657 16.583 5.712 11.957 12.677 768.93 18 8 123.887 23.316 15.006 4.972 17.055 4.977 10.116 14.547 760.59 19 1 119.336 24.41 58.455 36.823 58.699 37.027 58.557 36.667 1154.22 19 2 119.336 24.41 30.878 12.467 31.044 12.61 30.851 12.635 892.94 19 3 119.336 24.41 25.52 8.459 26.187 8.713 25.557 9.102 853.93 19 4 119.336 24.41 21.692 5.959 23.397 6.348 21.482 7.288 842.4 19 5 119.336 24.41 19.116 5.494 20.991 5.538 18.401 7.98 829.56 19 6 119.336 24.41 17.862 5.315 20.109 5.253 15.989 9.597 825.43 19 7 119.336 24.41 15.182 5.788 17.859 5.683 13.644 12.096 844.45 19 8 119.336 24.41 15.612 5.493 18.393 5.31 11.617 13.848 831.27 20 1 123.577 26.052 43.301 19.29 43.362 19.333 43.308 19.291 1007.84 20 2 123.577 26.052 25.734 2.655 25.861 2.711 25.667 2.508 804.12 20 3 123.577 26.052 22.88 2.62 23.815 2.57 22.402 4.936 796.31 20 4 123.577 26.052 20.178 3.152 21.891 3.065 19.624 7.129 801.92 20 5 123.577 26.052 18.948 3.407 21 3.339 17.084 9.791 800.07 20 6 123.577 26.052 18.506 3.423 20.545 3.369 15.126 11.819 801.03 20 7 123.577 26.052 17.229 3.774 19.377 3.717 13.307 13.408 805.87 20 8 123.577 26.052 16.073 4.146 18.538 4.013 11.527 14.981 811.42 > > > >