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<-9 > 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="")) + } 81 1 128.48 29.553 41.027 18.211 41.062 18.235 40.993 18.283 981.15 81 2 128.48 29.553 27.066 4.684 27.197 4.785 26.921 4.321 827.71 81 3 128.48 29.553 25.604 4.626 26.919 4.67 24.297 6.48 834.54 81 4 128.48 29.553 23.988 4.67 26.191 4.649 21.823 9.03 841.98 81 5 128.48 29.553 20.527 5.099 24.666 4.833 19.128 11.722 861.34 81 6 128.48 29.553 19.928 5.234 23.308 5.026 16.853 14.222 862.05 81 7 128.48 29.553 17.436 5.904 21.427 5.749 14.455 16.535 874.64 81 8 128.48 29.553 17.854 5.687 21.543 5.51 12.567 18.101 871 82 1 128.218 25.598 37.025 10.765 37.06 10.783 37.029 10.863 932.64 82 2 128.218 25.598 30.987 8.676 31.969 9.288 31.254 10.657 906.97 82 3 128.218 25.598 26.153 5.695 27.027 5.98 25.828 7.313 868.22 82 4 128.218 25.598 22.418 4.674 24.043 5.056 22.064 7.398 859.49 82 5 128.218 25.598 20.443 4.555 22.813 4.739 19.354 9.5 858.26 82 6 128.218 25.598 18.725 4.635 21.586 4.654 16.62 11.28 859.85 82 7 128.218 25.598 16.351 5.161 19.188 5.058 14.481 13.142 864.88 82 8 128.218 25.598 14.557 5.718 17.442 5.55 12.195 14.29 867.45 83 1 125.766 26.056 28.389 5.37 28.402 5.374 28.373 5.349 804.46 83 2 125.766 26.056 24.78 2.529 25.09 2.554 24.517 2.684 779.13 83 3 125.766 26.056 23.373 2.526 24.64 2.545 21.915 5.262 784.7 83 4 125.766 26.056 21.865 2.619 23.855 2.583 19.489 7.81 791.13 83 5 125.766 26.056 21.655 2.66 23.529 2.625 17.377 9.615 790.47 83 6 125.766 26.056 19.713 2.885 22.184 2.789 15.171 11.44 798.31 83 7 125.766 26.056 17.091 3.413 20.093 3.245 13.213 13.626 811.79 83 8 125.766 26.056 16.815 3.507 19.562 3.396 11.296 15.573 810.05 84 1 129.844 22.573 30.464 7.97 30.485 7.982 30.456 8.059 838.73 84 2 129.844 22.573 22.217 2.769 22.396 2.759 22.066 3.273 738.19 84 3 129.844 22.573 19.557 2.658 20.346 2.668 19.312 4.3 731.12 84 4 129.844 22.573 17.684 2.815 19.927 2.786 17.321 6.24 742.9 84 5 129.844 22.573 16.326 2.989 18.533 2.91 15.542 7.916 748.73 84 6 129.844 22.573 15.191 3.171 18.053 2.969 13.532 9.546 752.41 84 7 129.844 22.573 14.225 3.349 17.007 3.105 11.614 11.721 757.29 84 8 129.844 22.573 13.135 3.675 15.638 3.497 10.032 13.043 760.96 85 1 121.025 24.711 44.638 24.939 44.721 25 44.663 24.961 1023.06 85 2 121.025 24.711 29.305 12.319 29.572 12.471 29.418 12.754 872.78 85 3 121.025 24.711 22.274 8.414 22.604 8.485 22.165 8.557 788.31 85 4 121.025 24.711 18.473 7.044 19.641 7.076 18.481 8.378 769.7 85 5 121.025 24.711 15.987 7.339 17.743 7.436 15.492 10.832 758.56 85 6 121.025 24.711 14.383 7.538 16.294 7.504 13.422 12.607 754.28 85 7 121.025 24.711 12.948 7.863 15.297 7.664 11.629 14.033 755.16 85 8 121.025 24.711 12.713 7.698 14.843 7.621 9.881 15.564 748.09 86 1 128.769 27.064 26.51 1.798 26.52 1.799 26.504 1.846 771.99 86 2 128.769 27.064 24.192 1.809 25.497 1.823 23.589 4.698 776.38 86 3 128.769 27.064 22.121 2.092 24.059 2.06 20.754 7.538 779.15 86 4 128.769 27.064 20.103 2.597 22.517 2.468 18.401 9.716 780.66 86 5 128.769 27.064 19.549 2.593 21.806 2.528 16.416 11.527 781.04 86 6 128.769 27.064 16.053 4.101 18.833 3.974 14.474 13.154 791.93 86 7 128.769 27.064 14.762 4.563 17.995 4.313 12.556 14.938 796.76 86 8 128.769 27.064 14.415 4.492 17.477 4.26 11.053 16.145 797.1 87 1 129.177 25.231 27.873 4.455 27.886 4.46 27.865 4.546 796.03 87 2 129.177 25.231 24.423 3.257 25.923 3.513 24.442 5.848 795.92 87 3 129.177 25.231 21.475 2.943 24.011 2.718 21.088 5.979 790.58 87 4 129.177 25.231 20.044 3.068 21.6 3.062 18.118 8.001 772.98 87 5 129.177 25.231 18.045 3.508 20.05 3.443 15.854 10.146 771.04 87 6 129.177 25.231 15.668 4.29 18.507 4.139 13.709 12.337 774.37 87 7 129.177 25.231 14.623 4.56 17.259 4.457 11.805 14.092 775.13 87 8 129.177 25.231 16.372 3.776 18.246 3.706 10.042 15.678 772.6 88 1 122.563 26.359 46.052 23.831 46.128 23.89 46.065 23.676 1037.7 88 2 122.563 26.359 30.146 10.934 30.42 11.069 30.111 11.076 884.7 88 3 122.563 26.359 24.324 6.754 24.761 6.838 24.209 7.72 826.54 88 4 122.563 26.359 21.291 6.074 22.998 6.236 20.987 7.829 829.07 88 5 122.563 26.359 19.975 5.795 21.278 5.964 18.46 9.471 816.26 88 6 122.563 26.359 17.883 6.108 20.218 6.021 16.173 11.588 826.4 88 7 122.563 26.359 16.11 6.451 18.953 6.325 14.163 13.44 833.84 88 8 122.563 26.359 16.436 6.292 18.902 6.197 12.055 15.266 826.32 89 1 127.367 27.036 54.785 29.361 54.89 29.441 54.798 29.433 1120.76 89 2 127.367 27.036 38.656 15.311 39.101 15.615 38.739 15.613 1004.01 89 3 127.367 27.036 27.188 5.445 27.479 5.527 26.825 4.968 886.25 89 4 127.367 27.036 24.477 4.455 25.866 4.609 23.596 6.849 886.43 89 5 127.367 27.036 22.72 4.462 24.883 4.659 20.788 8.9 888.54 89 6 127.367 27.036 19.813 4.913 22.785 4.85 18.038 11.635 901.04 89 7 127.367 27.036 19.925 4.64 22.639 4.592 15.805 13.857 893.65 89 8 127.367 27.036 18.057 5.007 20.985 4.885 13.722 14.845 899.61 90 1 136.244 27.534 67.091 37.938 67.262 38.059 67.122 38.205 1218.85 90 2 136.244 27.534 31.843 7.883 31.907 7.898 31.627 8.094 906.73 90 3 136.244 27.534 26.884 5.709 28.726 6.323 27.244 7.499 902.41 90 4 136.244 27.534 23.405 5.085 24.98 5.395 22.997 8.157 873.29 90 5 136.244 27.534 20.909 5.3 23.528 5.198 19.973 10.994 882.26 90 6 136.244 27.534 20.344 5.112 22.853 5.161 17.117 12.336 870.34 90 7 136.244 27.534 17.092 5.982 19.557 5.913 14.693 14.296 879.57 90 8 136.244 27.534 17.284 5.731 19.67 5.603 12.398 16.508 872.81 > > > >