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<-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 138.895 28.197 60.058 29.187 60.23 29.321 60.093 29.486 1165.88 21 2 138.895 28.197 31.703 7.429 31.833 7.403 31.572 8.025 904.32 21 3 138.895 28.197 26.803 4.753 29.052 5.921 27.018 7.237 896.94 21 4 138.895 28.197 23.568 3.58 24.876 3.616 22.979 5.979 856.35 21 5 138.895 28.197 21.7 3.826 24.451 3.642 20.368 8.442 870.25 21 6 138.895 28.197 20.831 3.853 23.687 3.711 17.858 11.964 870.11 21 7 138.895 28.197 19.709 4.008 22.906 3.839 15.45 13.876 877.72 21 8 138.895 28.197 18.558 4.24 21.767 3.999 13.329 15.102 880.93 22 1 129.166 26.548 49.647 27.998 49.732 28.061 49.627 28.187 1073.26 22 2 129.166 26.548 36.157 18.392 36.676 18.736 36.197 19.368 976.07 22 3 129.166 26.548 27.925 12.101 28.559 12.432 27.706 13.154 901.42 22 4 129.166 26.548 21.211 6.082 21.751 6.135 20.728 6.429 828 22 5 129.166 26.548 19.758 6.018 21.145 6.015 18.609 8.632 832.64 22 6 129.166 26.548 19.159 5.947 20.897 5.954 16.523 10.753 829.55 22 7 129.166 26.548 17.533 6.152 19.529 6.066 14.364 13.054 839.73 22 8 129.166 26.548 18.422 6.054 19.96 5.975 12.448 14.348 829.16 23 1 127.205 25.658 33.885 10.968 33.908 10.98 33.879 11.046 889.94 23 2 127.205 25.658 28.427 7.786 30.17 8.744 29.071 8.815 877.62 23 3 127.205 25.658 23.806 4.514 25.397 5.039 23.921 4.891 840.9 23 4 127.205 25.658 21.241 3.984 22.654 3.978 20.718 6.758 812.05 23 5 127.205 25.658 19.446 4.188 21.559 4.115 18.318 8.828 816.64 23 6 127.205 25.658 17.135 4.719 20.12 4.537 15.741 11.353 836.26 23 7 127.205 25.658 18.088 4.329 20.249 4.234 13.781 13.082 812.67 23 8 127.205 25.658 15.211 5.057 17.925 4.916 12.049 14.691 835.05 24 1 125.946 26.435 26.756 3.016 26.769 3.018 26.756 3.061 776.49 24 2 125.946 26.435 22.908 3.374 23.338 3.405 22.777 4.778 755.57 24 3 125.946 26.435 20.229 3.745 23.008 3.394 19.986 7.563 758.66 24 4 125.946 26.435 18.382 4.072 20.786 4.022 17.618 9.395 759.58 24 5 125.946 26.435 16.511 4.573 18.683 4.456 15.353 11.738 761.52 24 6 125.946 26.435 16.001 4.448 18.402 4.299 13.414 13.486 761.03 24 7 125.946 26.435 15.127 4.713 17.458 4.529 11.49 15.186 760.3 24 8 125.946 26.435 13.577 5.413 16.214 5.2 9.886 16.831 763.73 25 1 131.228 26.878 44.066 17.648 44.122 17.683 44.081 17.718 1016.33 25 2 131.228 26.878 32.558 10.804 32.896 10.952 32.608 11.685 922.69 25 3 131.228 26.878 24.615 5.946 25.073 6.06 24.34 7.315 836.64 25 4 131.228 26.878 21.067 5.018 22.688 5.381 20.707 7.419 840.34 25 5 131.228 26.878 19.897 5.115 21.697 5.269 18.274 9.532 828.91 25 6 131.228 26.878 17.575 5.495 20.23 5.373 15.953 11.413 842.77 25 7 131.228 26.878 18.574 5.3 20.359 5.28 13.662 13.912 822.07 25 8 131.228 26.878 17.657 5.402 19.853 5.348 11.567 15.99 825.32 26 1 123.48 25.651 38.463 13.132 38.511 13.161 38.464 13.112 951.1 26 2 123.48 25.651 25.757 5.212 25.99 5.298 25.755 5.886 806.79 26 3 123.48 25.651 21.587 3.983 22.202 4.071 21.509 5.384 774.93 26 4 123.48 25.651 19.456 4.141 21.114 4.202 19.088 8.159 780.91 26 5 123.48 25.651 17.207 4.559 19.807 4.407 16.68 10.389 790.25 26 6 123.48 25.651 16.415 4.638 18.705 4.512 14.557 11.712 782.73 26 7 123.48 25.651 16.491 4.494 18.733 4.364 12.362 13.976 779.13 26 8 123.48 25.651 13.759 5.555 16.407 5.365 10.554 15.928 786.61 27 1 122.088 25.341 69.857 51.532 70.591 52.243 70.268 52.519 1243.24 27 2 122.088 25.341 34.136 14.553 34.321 14.686 34.007 14.628 941.16 27 3 122.088 25.341 25.157 9.462 25.706 9.757 25.19 10.432 854.31 27 4 122.088 25.341 19.498 5.282 19.781 5.26 19.283 6.485 771.83 27 5 122.088 25.341 18.597 4.989 19.735 4.925 16.878 8.739 776.17 27 6 122.088 25.341 16.994 5.318 18.891 5.216 14.611 10.989 782.77 27 7 122.088 25.341 14.353 6.056 17.474 5.734 12.606 12.952 791.79 27 8 122.088 25.341 13.517 6.239 16.314 5.972 10.663 14.93 792.57 28 1 120.989 24.257 56.922 36.035 57.084 36.17 56.962 36.174 1140.28 28 2 120.989 24.257 26.028 4.576 26.26 4.648 25.843 4.49 810.86 28 3 120.989 24.257 21.518 4.187 21.995 4.302 21.189 5.336 770.95 28 4 120.989 24.257 18.898 4.032 20.156 4.111 18.463 6.819 773.76 28 5 120.989 24.257 17.228 4.144 19.071 4.175 16.158 9.065 776.1 28 6 120.989 24.257 15.905 4.352 18.276 4.308 13.993 11.102 779.67 28 7 120.989 24.257 13.941 4.929 17.003 4.648 11.864 13.017 786.17 28 8 120.989 24.257 14.318 4.659 16.48 4.553 10.197 14.561 781.92 29 1 119.345 24.088 30.964 8.526 30.988 8.538 30.96 8.404 846.44 29 2 119.345 24.088 23.244 3.348 23.448 3.339 23.091 3.595 749.11 29 3 119.345 24.088 20.713 2.635 21.331 2.617 20.351 4.272 739.86 29 4 119.345 24.088 18.461 2.923 20.001 2.844 17.51 6.962 743.67 29 5 119.345 24.088 17.172 3.188 19.388 3.075 15.335 9.164 744.77 29 6 119.345 24.088 17.399 3.016 19.416 2.907 13.146 11.259 743.64 29 7 119.345 24.088 16.074 3.373 17.996 3.221 11.317 12.955 747.48 29 8 119.345 24.088 11.99 5.132 14.861 4.788 9.347 14.828 764.43 30 1 128.97 25.559 34.406 9.89 34.435 9.906 34.407 9.941 897.2 30 2 128.97 25.559 24.459 3.032 24.68 3.055 24.316 3.279 781.8 30 3 128.97 25.559 22.64 2.774 24.186 2.821 21.693 5.706 784.89 30 4 128.97 25.559 20.166 2.943 22.749 2.906 19.193 7.769 795.95 30 5 128.97 25.559 20.575 2.793 22.454 2.781 16.956 9.92 789.71 30 6 128.97 25.559 18.643 3.048 21.065 3.012 14.77 12.007 796.08 30 7 128.97 25.559 18.064 3.129 20.356 3.068 12.831 13.321 795.86 30 8 128.97 25.559 16.179 3.571 18.922 3.443 10.953 15.233 805.3 > > > >