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<-4 > 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="")) + } 31 1 132.154 25.127 41.635 16.417 41.69 16.451 41.651 16.541 989.41 31 2 132.154 25.127 29.627 9.728 29.847 9.819 29.622 10.424 874.15 31 3 132.154 25.127 24.086 6.72 24.562 6.922 23.968 7.599 826.48 31 4 132.154 25.127 21.565 5.27 22.669 5.382 21.095 6.854 821.53 31 5 132.154 25.127 19.292 5.328 21.347 5.331 18.494 9.31 830.68 31 6 132.154 25.127 19.352 5.126 21.27 5.151 16.221 11.391 826.53 31 7 132.154 25.127 18.14 5.16 20.452 5.197 14.002 12.9 831.78 31 8 132.154 25.127 16.843 5.315 19.687 5.353 12.107 14.653 839.56 32 1 122.106 22.766 62.156 43.031 62.433 43.284 62.235 43.288 1182.58 32 2 122.106 22.766 37.973 21.198 38.325 21.472 38.04 21.67 994.69 32 3 122.106 22.766 27.343 13.317 28.078 13.854 27.366 14.423 890.98 32 4 122.106 22.766 20.739 6.382 21.716 6.751 20.503 7.287 813.17 32 5 122.106 22.766 18.333 5.568 19.249 5.57 17.162 7.955 797.99 32 6 122.106 22.766 16.323 5.588 18.381 5.58 14.818 9.756 801.32 32 7 122.106 22.766 14.777 5.975 16.946 6.012 12.668 10.73 805.52 32 8 122.106 22.766 13.411 6.182 16.068 6.07 10.923 13.503 809.02 33 1 119.594 23.924 22.858 1.924 22.865 1.925 22.857 1.891 700.82 33 2 119.594 23.924 20.936 2.02 21.996 2.027 20.424 4.307 706.99 33 3 119.594 23.924 20.007 2.059 21.482 2.042 18.21 6.448 709.36 33 4 119.594 23.924 18.757 2.223 20.636 2.193 16.146 8.494 713.18 33 5 119.594 23.924 18.559 2.236 20.388 2.187 14.254 9.973 715.03 33 6 119.594 23.924 17.974 2.332 19.833 2.279 12.632 11.352 715.56 33 7 119.594 23.924 14.791 3.199 17.088 3.051 11.035 13.264 726.36 33 8 119.594 23.924 14.857 3.155 16.968 3.034 9.518 14.431 724.73 34 1 123.934 23.205 42.652 18.542 42.715 18.586 42.661 18.518 1000.91 34 2 123.934 23.205 27.045 7.65 27.236 7.767 27.025 7.905 830.73 34 3 123.934 23.205 20.059 3.768 20.28 3.799 19.737 4.609 739.09 34 4 123.934 23.205 17.877 3.931 19.051 3.797 17.556 6.506 742.27 34 5 123.934 23.205 16.275 4.139 18.32 4.071 15.562 8.234 749.23 34 6 123.934 23.205 15.651 4.124 17.711 4.033 13.671 10.285 743.87 34 7 123.934 23.205 13.874 4.689 16.398 4.566 11.842 12.094 753.55 34 8 123.934 23.205 13.467 4.703 15.65 4.58 10.005 13.818 752.78 35 1 130.13 27.148 27.582 3.281 27.595 3.283 27.581 3.334 791.19 35 2 130.13 27.148 24.061 2.665 24.757 2.689 24.026 3.574 782.73 35 3 130.13 27.148 21.506 3.005 23.5 2.887 21.401 6.28 791.46 35 4 130.13 27.148 20.311 3.014 22.744 2.865 18.898 8.886 789.88 35 5 130.13 27.148 17.708 3.745 21.083 3.504 16.742 11.043 800.21 35 6 130.13 27.148 17.682 3.584 20.67 3.379 14.512 13.26 794.54 35 7 130.13 27.148 14.269 5.015 17.691 4.708 12.463 15.182 811.63 35 8 130.13 27.148 15.293 4.317 18.091 4.17 10.563 16.928 800.19 36 1 120.34 25.296 49.982 30.69 50.104 30.794 50.001 30.833 1077.44 36 2 120.34 25.296 27.975 8.486 28.115 8.569 27.854 8.465 844.34 36 3 120.34 25.296 23.631 5.499 24.505 5.824 23.497 5.686 828.39 36 4 120.34 25.296 21.656 4.597 22.717 4.734 20.556 6.88 815.98 36 5 120.34 25.296 20.064 4.536 22.002 4.533 17.941 9.236 820.75 36 6 120.34 25.296 18.439 4.641 20.836 4.562 15.731 9.977 826.92 36 7 120.34 25.296 16.608 4.886 19.44 4.661 13.47 12.245 837.29 36 8 120.34 25.296 16.095 4.94 18.978 4.734 11.276 13.992 836.52 37 1 124.898 23.955 40.884 20.374 40.94 20.418 40.891 20.495 980.42 37 2 124.898 23.955 23.842 3.903 23.971 3.945 23.723 3.788 768.07 37 3 124.898 23.955 21.535 3.512 23.388 3.692 21.111 5.616 773.1 37 4 124.898 23.955 20.447 3.278 22.423 3.326 18.573 7.517 773.61 37 5 124.898 23.955 19.399 3.315 21.294 3.336 16.682 9.5 775.1 37 6 124.898 23.955 18.138 3.403 20.313 3.344 14.616 10.396 778.37 37 7 124.898 23.955 15.982 3.908 18.607 3.923 12.672 12.198 785.66 37 8 124.898 23.955 15.388 3.966 18.018 3.901 10.915 13.5 787.71 38 1 125.821 26.625 29.036 3.795 29.05 3.799 29.016 3.856 815.25 38 2 125.821 26.625 26.54 2.621 27.466 2.701 25.887 4.504 814.13 38 3 125.821 26.625 24.728 2.436 26.438 2.542 23.381 5.642 817.74 38 4 125.821 26.625 22.052 2.628 24.724 2.639 20.933 7.415 827.1 38 5 125.821 26.625 20.612 2.742 23.698 2.754 18.4 9.993 831.51 38 6 125.821 26.625 18.931 2.981 22.64 2.865 16.036 12.504 837.99 38 7 125.821 26.625 18.665 2.963 21.826 2.864 13.788 14.449 835.75 38 8 125.821 26.625 19.133 2.816 21.99 2.694 11.676 16.547 831.85 39 1 125.069 24.555 41.443 16.774 41.503 16.814 41.441 16.777 986.72 39 2 125.069 24.555 24.714 4.143 24.813 4.167 24.62 4.127 787.16 39 3 125.069 24.555 21.474 3.205 22.376 3.212 21.119 6.214 771 39 4 125.069 24.555 18.588 4.318 19.724 4.306 18.558 7.301 767.77 39 5 125.069 24.555 16.644 4.629 18.732 4.52 15.857 9.481 774.42 39 6 125.069 24.555 15.076 5.024 17.458 4.905 14.082 11.392 780.66 39 7 125.069 24.555 15.108 4.659 17.479 4.587 12.259 12.99 775.97 39 8 125.069 24.555 13.142 5.391 16.107 5.163 10.363 14.869 789.79 40 1 118.205 25.896 25.746 1.885 25.757 1.886 25.743 1.793 757.96 40 2 118.205 25.896 23.599 1.933 24.596 1.964 22.982 3.853 760.54 40 3 118.205 25.896 21.553 2.128 23.609 2.062 20.385 6.663 765.09 40 4 118.205 25.896 20.749 2.222 22.872 2.184 18.082 8.665 763.48 40 5 118.205 25.896 19.029 2.599 21.445 2.531 16.027 10.699 765.99 40 6 118.205 25.896 16.073 3.704 19.011 3.593 13.807 12.316 775.23 40 7 118.205 25.896 15.934 3.611 18.565 3.425 11.668 14.805 770.5 40 8 118.205 25.896 16.034 3.493 18.014 3.352 10.003 16.222 767.54 > > > >