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<-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 131.258 24.916 32.566 9.75 32.587 9.761 32.562 9.867 870.91 31 2 131.258 24.916 22.845 2.039 22.953 2.038 22.821 2.238 748.72 31 3 131.258 24.916 21.187 2.084 22.587 2.039 20.298 4.719 755.45 31 4 131.258 24.916 19.736 2.243 21.825 2.138 18.176 6.822 759.95 31 5 131.258 24.916 17.405 2.675 20.232 2.47 16.146 9.011 770.2 31 6 131.258 24.916 16.944 2.771 19.289 2.612 14.013 11.021 770.07 31 7 131.258 24.916 17.44 2.712 19.556 2.602 12.173 12.907 767.7 31 8 131.258 24.916 16.095 3.034 18.327 2.878 10.522 14.654 772.95 32 1 119.421 22.934 46.309 30.223 46.449 30.354 46.38 30.479 1041.31 32 2 119.421 22.934 20.403 2.68 20.448 2.688 20.348 2.792 691.66 32 3 119.421 22.934 17.67 3.581 18.174 3.593 17.546 5.622 679.74 32 4 119.421 22.934 16.563 3.686 17.781 3.668 15.601 7.531 684.67 32 5 119.421 22.934 15.242 3.935 17.237 3.836 13.843 9.314 691.77 32 6 119.421 22.934 15.302 3.813 17.055 3.742 11.985 11.195 691.61 32 7 119.421 22.934 14.285 4.041 16.43 3.928 10.269 12.848 696.78 32 8 119.421 22.934 13.35 4.32 15.748 4.17 8.682 14.442 702.22 33 1 126.159 25.52 24.893 1.271 24.901 1.271 24.891 1.253 741.74 33 2 126.159 25.52 23.101 1.314 24.427 1.289 22.124 3.657 746.25 33 3 126.159 25.52 21.593 1.448 23.201 1.393 19.635 6.067 747.38 33 4 126.159 25.52 18.828 2.188 20.852 2.097 17.696 7.926 750.86 33 5 126.159 25.52 16.75 2.923 19.643 2.732 15.645 9.994 759.6 33 6 126.159 25.52 17.369 2.459 19.872 2.336 13.642 12.019 754.95 33 7 126.159 25.52 15.361 3.176 18.345 2.976 11.786 13.949 762.03 33 8 126.159 25.52 13.132 4.198 15.899 3.961 9.9 15.838 777.11 34 1 123.585 24.223 34.822 13.355 34.853 13.376 34.818 13.406 903.21 34 2 123.585 24.223 22.313 2.203 22.369 2.19 22.126 2.224 735.72 34 3 123.585 24.223 19.915 2.639 20.668 2.639 19.533 4.828 736.49 34 4 123.585 24.223 18.567 2.763 20.338 2.676 17.428 6.938 742.12 34 5 123.585 24.223 16.73 3.362 19.393 3.167 15.688 8.742 748.87 34 6 123.585 24.223 16.368 3.211 18.668 3.083 14.049 10.327 752.7 34 7 123.585 24.223 13.735 4.279 16.481 4.082 12.331 12.018 770.69 34 8 123.585 24.223 13.291 4.34 16.217 4.105 10.869 13.422 771.78 35 1 123.28 26.944 26.708 2.965 26.719 2.967 26.704 2.95 775.62 35 2 123.28 26.944 24.134 2.766 25.831 2.884 23.971 3.758 784.04 35 3 123.28 26.944 22.842 2.524 24.387 2.544 21.38 6.446 781.72 35 4 123.28 26.944 20.354 3.036 22.925 2.977 18.787 9.419 789.72 35 5 123.28 26.944 19.486 3.079 21.941 2.996 16.451 11.656 789.24 35 6 123.28 26.944 17.859 3.53 20.525 3.379 14.25 13.378 792.88 35 7 123.28 26.944 15.723 4.359 18.66 4.099 12.438 14.852 804.97 35 8 123.28 26.944 15.36 4.347 17.974 4.153 10.69 16.466 801.04 36 1 130.205 28.023 49.073 26.032 49.175 26.114 49.102 26.298 1068.66 36 2 130.205 28.023 25.919 2.447 26.087 2.505 25.668 2.463 807.59 36 3 130.205 28.023 24.446 2.527 25.469 2.498 23.035 5.199 811.41 36 4 130.205 28.023 23.021 2.686 24.364 2.635 20.422 7.778 814.7 36 5 130.205 28.023 20.119 3.263 22.736 3.185 18.024 10.135 825.17 36 6 130.205 28.023 20.149 3.275 22.319 3.154 15.932 12.187 823.37 36 7 130.205 28.023 17.846 3.826 20.791 3.628 13.879 14.282 834.06 36 8 130.205 28.023 14.731 5.008 18.284 4.682 12.109 15.924 851.72 37 1 126.871 24.642 41.657 18.914 41.717 18.957 41.66 19.034 989.44 37 2 126.871 24.642 22.996 1.832 23.059 1.83 22.917 1.824 749.17 37 3 126.871 24.642 21.067 1.974 22.945 1.869 20.544 4.205 757.53 37 4 126.871 24.642 19.945 2.096 21.977 2.01 18.379 6.363 759.48 37 5 126.871 24.642 18.003 2.444 20.806 2.249 16.279 8.425 769.53 37 6 126.871 24.642 17.094 2.652 20.094 2.423 14.093 10.647 770.26 37 7 126.871 24.642 16.042 2.947 18.441 2.78 12.095 12.877 774.51 37 8 126.871 24.642 13.678 3.771 16.527 3.498 9.96 14.742 787.23 38 1 126.121 27.24 28.701 3.092 28.714 3.095 28.689 3.073 809.74 38 2 126.121 27.24 25.083 1.867 25.467 1.832 24.575 3.3 782.34 38 3 126.121 27.24 22.23 2.305 23.595 2.243 21.593 5.966 784.36 38 4 126.121 27.24 21.135 2.542 22.554 2.483 19.12 8.508 780.48 38 5 126.121 27.24 18.98 3.278 20.982 3.175 16.961 10.694 781.09 38 6 126.121 27.24 17.404 3.802 19.623 3.705 14.964 12.805 786.36 38 7 126.121 27.24 16.895 3.966 19.272 3.839 12.927 14.713 784.93 38 8 126.121 27.24 14.093 5.134 17.141 4.882 11.244 16.433 801.58 39 1 122.747 25.334 41.323 15.527 41.387 15.567 41.319 15.408 985.33 39 2 122.747 25.334 22.516 2.877 22.55 2.857 22.359 3.064 740.19 39 3 122.747 25.334 20.641 3.02 22.385 2.911 20.044 5.326 748.01 39 4 122.747 25.334 19.478 3.094 21.447 3.001 17.938 7.486 751.14 39 5 122.747 25.334 17.067 3.689 19.988 3.492 15.909 9.467 763.43 39 6 122.747 25.334 16.86 3.651 19.243 3.492 13.943 11.633 761.08 39 7 122.747 25.334 14.767 4.318 17.558 4.079 11.958 13.503 772.99 39 8 122.747 25.334 15.839 3.901 17.859 3.755 10.389 14.975 762.74 40 1 116.298 27.807 27.688 2.722 27.701 2.724 27.685 2.634 792.91 40 2 116.298 27.807 24.81 2.527 25.438 2.533 24.6 3.66 788.46 40 3 116.298 27.807 22.587 2.771 24.642 2.657 21.878 6.313 792.68 40 4 116.298 27.807 21.435 2.993 23.703 2.891 19.193 8.994 790.84 40 5 116.298 27.807 21.314 3.001 22.992 2.98 16.817 11.62 789.57 40 6 116.298 27.807 17.431 4.174 20.252 4.027 14.831 13.425 802.4 40 7 116.298 27.807 16.578 4.444 19.527 4.307 12.841 15.254 804.52 40 8 116.298 27.807 17.308 4.066 19.694 3.985 11.051 17.006 798.94 > > > >