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<-3 > 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="")) + } 21 1 131.094 24.764 49.29 25.323 49.391 25.408 49.307 25.568 1070.53 21 2 131.094 24.764 22.368 2.146 22.441 2.199 22.328 2.596 736.42 21 3 131.094 24.764 20.283 2.42 22.158 2.268 19.7 5.246 742.91 21 4 131.094 24.764 19.172 2.447 20.627 2.415 17.699 7.229 747.8 21 5 131.094 24.764 18.074 2.658 20.38 2.546 15.79 9.158 752.71 21 6 131.094 24.764 18.556 2.466 20.323 2.393 14.092 10.726 752.76 21 7 131.094 24.764 15.356 3.412 18.224 3.226 12.507 12.517 764.66 21 8 131.094 24.764 14.489 3.665 17.436 3.413 10.437 14.554 768.84 22 1 125.467 24.521 37.853 15.217 37.892 15.242 37.846 15.274 943.02 22 2 125.467 24.521 23.099 1.711 23.172 1.726 22.932 1.682 750.17 22 3 125.467 24.521 21.531 1.772 22.855 1.735 20.603 3.981 758.59 22 4 125.467 24.521 20.037 1.933 22.204 1.829 18.41 6.258 766.64 22 5 125.467 24.521 19.991 1.871 21.695 1.812 16.333 8.3 765.78 22 6 125.467 24.521 18.738 2.066 20.936 1.981 14.431 10.185 772.38 22 7 125.467 24.521 17.459 2.362 19.906 2.226 12.493 12.168 779.19 22 8 125.467 24.521 15.952 2.71 18.903 2.512 10.903 13.808 788.46 23 1 126.806 26.869 30.182 5.809 30.196 5.815 30.178 5.835 834.29 23 2 126.806 26.869 24.316 2.411 24.526 2.409 24.303 2.855 777.72 23 3 126.806 26.869 22.308 2.533 24.066 2.466 21.746 5.403 787.94 23 4 126.806 26.869 20.849 2.666 23.138 2.556 19.389 7.843 793.2 23 5 126.806 26.869 19.028 3.036 21.731 2.864 17.353 9.692 801.41 23 6 126.806 26.869 18.347 3.178 21.119 3.009 15.433 11.639 801.91 23 7 126.806 26.869 16.331 3.784 19.412 3.536 13.525 13.847 811.89 23 8 126.806 26.869 15.232 4.203 18.1 3.974 11.704 15.545 815.68 24 1 124.094 23.014 22.707 2.128 22.714 2.129 22.706 2.156 697.71 24 2 124.094 23.014 20.356 2.37 21.304 2.408 20.074 4.786 699.99 24 3 124.094 23.014 18.264 2.817 20.333 2.693 17.976 6.865 703.84 24 4 124.094 23.014 16.835 3.011 19.263 3.003 16.055 8.676 708.94 24 5 124.094 23.014 17.087 2.576 19.14 2.523 14.167 9.526 708.28 24 6 124.094 23.014 15.836 2.89 18.256 2.828 12.354 11.274 712.02 24 7 124.094 23.014 14.11 3.398 16.829 3.276 10.729 12.961 719.29 24 8 124.094 23.014 13.153 3.679 15.711 3.524 9.131 14.263 723.5 25 1 122.882 24.555 33.98 9.943 34.006 9.956 33.981 9.936 891.23 25 2 122.882 24.555 22.546 1.773 22.625 1.77 22.505 2.086 740.15 25 3 122.882 24.555 20.082 2.054 22.511 1.787 19.733 4.805 743.2 25 4 122.882 24.555 17.877 2.756 19.594 2.654 17.366 7.164 745.26 25 5 122.882 24.555 16.905 2.88 19.345 2.709 15.486 9.049 747.96 25 6 122.882 24.555 17.098 2.598 19.152 2.475 13.5 11.093 751.55 25 7 122.882 24.555 14.772 3.479 17.624 3.247 11.662 12.855 756.37 25 8 122.882 24.555 14.01 3.746 16.64 3.531 10.005 14.526 759.32 26 1 127.15 23.333 32.572 10.978 32.601 10.995 32.58 11.033 871.26 26 2 127.15 23.333 20.468 2.939 20.695 3.009 20.494 3.249 696.17 26 3 127.15 23.333 18.149 3.331 19.166 3.385 17.99 5.443 695.04 26 4 127.15 23.333 16.569 3.629 18.204 3.515 16.003 7.889 700.3 26 5 127.15 23.333 14.81 4.232 17.024 4.098 14.076 9.457 706.57 26 6 127.15 23.333 15.524 3.856 17.242 3.772 12.473 11.136 697.82 26 7 127.15 23.333 13.532 4.464 15.681 4.309 11.043 12.463 709.52 26 8 127.15 23.333 13.293 4.511 15.382 4.402 9.223 14.505 709.1 27 1 124.709 26.07 64.486 44.757 65.081 45.345 64.893 45.536 1205.11 27 2 124.709 26.07 24.246 1.975 24.298 1.971 24.085 1.933 775.5 27 3 124.709 26.07 22.495 2.051 23.94 1.998 21.644 4.425 782.7 27 4 124.709 26.07 21.01 2.212 23.153 2.112 19.246 6.787 788.23 27 5 124.709 26.07 17.594 2.991 20.929 2.695 16.865 9.187 802.16 27 6 124.709 26.07 19.435 2.518 21.694 2.39 14.56 11.453 793.28 27 7 124.709 26.07 15.369 3.774 18.845 3.392 12.525 13.586 806.39 27 8 124.709 26.07 18.298 2.84 20.409 2.712 10.923 15.095 798.07 28 1 136.684 28.378 60.411 33.882 60.564 33.999 60.476 34.317 1168.76 28 2 136.684 28.378 26.935 1.516 26.976 1.511 26.744 1.662 825.97 28 3 136.684 28.378 24.432 1.714 25.823 1.668 23.827 4.601 833.24 28 4 136.684 28.378 21.961 2.223 24.753 2.075 20.765 7.616 842.47 28 5 136.684 28.378 20.806 2.445 23.436 2.232 18.538 10.049 841.14 28 6 136.684 28.378 18.968 2.957 22.046 2.742 16.374 12.131 846.53 28 7 136.684 28.378 18.722 3.069 21.302 2.909 14.185 14.193 844.4 28 8 136.684 28.378 15.213 4.434 18.747 4.097 12.179 16.194 867.87 29 1 117.857 22.507 29.203 6.961 29.225 6.972 29.204 6.89 818.48 29 2 117.857 22.507 19.932 2.301 20.165 2.284 19.934 3.078 683.87 29 3 117.857 22.507 18.253 2.348 19.764 2.293 17.769 5.243 690.42 29 4 117.857 22.507 18.024 2.229 19.265 2.153 15.671 7.128 689.06 29 5 117.857 22.507 14.768 3.116 17.059 2.947 13.649 9.295 702.87 29 6 117.857 22.507 14.739 2.992 16.875 2.805 11.828 10.844 699.41 29 7 117.857 22.507 12.407 3.94 14.58 3.715 10.048 12.54 708.3 29 8 117.857 22.507 10.499 5.012 12.961 4.744 8.648 14.019 716.57 30 1 130.936 26.423 30.978 9.152 31 9.161 30.975 9.324 846.66 30 2 130.936 26.423 22.237 3.611 22.352 3.602 22.098 4.624 732.33 30 3 130.936 26.423 20.128 3.997 21.214 3.96 19.616 7.1 735.48 30 4 130.936 26.423 17.983 4.432 20.257 4.27 17.12 9.507 742.65 30 5 130.936 26.423 16.694 4.762 19.131 4.539 14.903 11.779 742.67 30 6 130.936 26.423 17.087 4.501 19.278 4.348 12.994 13.771 739.96 30 7 130.936 26.423 14.567 5.436 16.923 5.255 11.245 15.199 745.78 30 8 130.936 26.423 14.95 5.186 17.11 5.036 9.801 16.873 744.73 > > > >