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<-10 > 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="")) + } 91 1 119.51 24.807 52.768 30.601 52.988 30.794 52.881 30.531 1105.33 91 2 119.51 24.807 22.278 2.964 22.357 2.985 22.123 2.927 735.68 91 3 119.51 24.807 19.392 3.403 20.547 3.352 19.495 5.371 738.7 91 4 119.51 24.807 17.012 4.204 18.795 4.025 16.719 8.061 732.16 91 5 119.51 24.807 14.587 5.875 15.708 5.851 14.173 10.623 712.41 91 6 119.51 24.807 14.392 5.367 15.763 5.29 12.425 12.376 716.31 91 7 119.51 24.807 12.534 6.382 14.681 6.234 10.75 14.074 722.82 91 8 119.51 24.807 11.907 6.55 14.018 6.36 9.318 15.791 726.41 92 1 121.744 23.007 26.941 5.58 26.956 5.586 26.934 5.58 779.65 92 2 121.744 23.007 20.316 2.635 20.444 2.654 20.268 3.151 691.15 92 3 121.744 23.007 18.506 2.797 20.261 2.708 18.044 5.378 698.34 92 4 121.744 23.007 17.888 2.745 19.366 2.691 15.985 7.332 699.86 92 5 121.744 23.007 16.554 3.012 18.58 2.899 14.026 9.118 703.16 92 6 121.744 23.007 16.719 2.906 18.429 2.846 12.242 10.783 703.37 92 7 121.744 23.007 11.831 4.954 14.573 4.752 10.558 12.734 722.32 92 8 121.744 23.007 12.918 4.092 15.079 3.971 9 14.358 714.54 93 1 116.402 27.271 55.369 33.561 55.539 33.709 55.422 33.375 1127.16 93 2 116.402 27.271 24.984 2.7 25.045 2.704 24.876 2.47 789.29 93 3 116.402 27.271 23.573 2.74 24.822 2.712 22.246 5.07 796.15 93 4 116.402 27.271 21.579 2.908 24.372 2.769 20.024 7.298 807.61 93 5 116.402 27.271 19.985 3.165 23.004 3.001 17.575 9.978 815.76 93 6 116.402 27.271 20.421 3.083 22.992 2.949 15.494 11.941 811.07 93 7 116.402 27.271 18.665 3.398 21.15 3.236 13.438 13.975 819.73 93 8 116.402 27.271 18.587 3.487 21.086 3.322 11.545 15.787 820.14 94 1 121.267 24.337 60.426 41.339 60.791 41.679 60.616 41.696 1171.31 94 2 121.267 24.337 22.686 1.93 22.718 1.895 22.578 1.819 744.39 94 3 121.267 24.337 20.755 1.997 22.148 1.896 20.343 4.116 753.26 94 4 121.267 24.337 19.585 2.115 21.607 1.982 18.082 6.438 753.26 94 5 121.267 24.337 18.419 2.346 20.214 2.233 16.122 8.355 754.28 94 6 121.267 24.337 16.159 3.013 18.706 2.842 13.961 10.33 766.1 94 7 121.267 24.337 15.114 3.349 17.838 3.133 12.008 12.347 769.71 94 8 121.267 24.337 14.461 3.554 17.003 3.33 10.267 14.131 768.61 95 1 129.392 26.487 31.48 6.374 31.502 6.384 31.477 6.429 854.66 95 2 129.392 26.487 24.233 1.988 24.377 1.974 24.172 2.372 774.77 95 3 129.392 26.487 21.59 2.369 23.776 2.191 21.63 4.879 785.91 95 4 129.392 26.487 20.648 2.417 22.927 2.287 19.031 7.68 782.93 95 5 129.392 26.487 20.374 2.425 22.292 2.334 16.884 9.86 781.44 95 6 129.392 26.487 15.997 4.101 18.586 3.929 14.732 12.067 799.63 95 7 129.392 26.487 15.074 4.44 17.806 4.279 12.734 13.985 800.9 95 8 129.392 26.487 13.92 4.899 16.571 4.715 10.997 15.608 805.41 96 1 121.426 23.752 32.679 10.174 32.707 10.189 32.662 10.243 871.51 96 2 121.426 23.752 22.274 1.586 22.374 1.583 22.211 1.632 735.29 96 3 121.426 23.752 20.051 1.807 21.333 1.769 19.779 4.02 742.42 96 4 121.426 23.752 18.461 2.13 20.697 1.969 17.427 6.481 745.07 96 5 121.426 23.752 16.222 2.744 18.912 2.542 15.225 8.805 754.98 96 6 121.426 23.752 16.58 2.596 18.774 2.445 13.243 10.882 745.82 96 7 121.426 23.752 14.649 3.261 17.04 3.128 11.383 12.725 751.14 96 8 121.426 23.752 13.684 3.587 16.024 3.417 9.842 14.21 755.85 97 1 133.83 26.569 31.961 6.25 31.983 6.259 31.942 6.39 861.45 97 2 133.83 26.569 24.158 1.754 24.471 1.699 23.984 2.793 772.49 97 3 133.83 26.569 21.93 2.064 23.276 2.019 21.17 5.698 774.82 97 4 133.83 26.569 20.13 2.39 22.264 2.282 18.705 8.202 778.09 97 5 133.83 26.569 20.094 2.241 22.09 2.152 16.218 10.675 777.5 97 6 133.83 26.569 17.604 2.98 19.965 2.842 14.118 12.809 780.23 97 7 133.83 26.569 15.785 3.63 18.472 3.412 12.169 14.289 783.89 97 8 133.83 26.569 16.174 3.403 18.126 3.267 10.166 16.356 778.94 98 1 128.627 22.961 35.076 15.939 35.115 15.966 35.09 16.097 906.94 98 2 128.627 22.961 20.818 2.133 20.87 2.144 20.754 2.202 702.96 98 3 128.627 22.961 19.125 2.247 20.699 2.172 18.593 4.357 710.77 98 4 128.627 22.961 18.017 2.398 19.806 2.331 16.679 6.346 714.43 98 5 128.627 22.961 16.021 2.833 18.402 2.66 14.61 8.326 726.14 98 6 128.627 22.961 14.481 3.255 17.119 3.079 13.057 9.939 735.99 98 7 128.627 22.961 13.494 3.589 16.399 3.377 11.412 11.649 741.15 98 8 128.627 22.961 13.636 3.51 16.147 3.317 9.669 13.384 735.8 99 1 129.291 26.786 55.45 28.126 55.65 28.284 55.535 28.216 1128.35 99 2 129.291 26.786 24.142 2.646 24.211 2.695 24.064 2.681 774.07 99 3 129.291 26.786 21.25 3.449 21.933 3.466 21.076 5.826 770.55 99 4 129.291 26.786 19.932 3.511 21.804 3.434 18.86 8.046 776.21 99 5 129.291 26.786 19.028 3.583 21.489 3.435 16.916 9.97 780.55 99 6 129.291 26.786 17.246 4.071 20.194 3.877 14.879 12.238 787.72 99 7 129.291 26.786 14.83 4.983 18.424 4.651 12.853 13.939 802.2 99 8 129.291 26.786 15.01 4.73 17.803 4.499 10.899 16.089 796.43 100 1 124.468 24.422 35.929 16.247 35.969 16.274 35.934 16.418 918.23 100 2 124.468 24.422 21.428 3.299 21.573 3.411 21.424 3.474 717.12 100 3 124.468 24.422 19.779 3.296 21.024 3.347 19.166 5.593 721.04 100 4 124.468 24.422 18.835 3.405 20.28 3.37 16.968 7.672 721.92 100 5 124.468 24.422 16.994 3.717 19.312 3.563 14.901 9.763 728.25 100 6 124.468 24.422 14.764 4.386 16.962 4.301 12.992 11.918 735.53 100 7 124.468 24.422 13.64 4.754 16.024 4.566 11.285 13.19 740.9 100 8 124.468 24.422 13.96 4.558 16.204 4.422 9.774 14.8 733.45 > > >