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<-10 > 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="")) + } 91 1 126.263 26.217 62.517 38.897 62.793 39.127 62.644 39.162 1186.6 91 2 126.263 26.217 34.145 14.077 34.306 14.174 33.934 14.098 941.35 91 3 126.263 26.217 26.274 6.247 26.62 6.331 26.203 6.321 868.96 91 4 126.263 26.217 22.159 5.046 23.237 5.05 21.755 5.121 851.17 91 5 126.263 26.217 19.945 5.197 22.337 5.249 19.269 8.335 859.15 91 6 126.263 26.217 18.562 5.312 20.811 5.304 16.914 10.976 856.72 91 7 126.263 26.217 17.347 5.478 19.918 5.305 14.617 12.548 856.11 91 8 126.263 26.217 16.184 5.712 19.073 5.513 12.624 15.057 860.72 92 1 121.978 24.57 32.391 8.824 32.417 8.837 32.391 8.721 868.2 92 2 121.978 24.57 26.235 6.583 27.07 6.94 26.432 7.562 823.78 92 3 121.978 24.57 21.087 3.784 22.042 3.886 21.068 5.537 769.29 92 4 121.978 24.57 18.562 4.137 19.9 4.054 18.233 7.476 765.39 92 5 121.978 24.57 17.596 4.069 19.391 4.056 15.951 10.471 764.76 92 6 121.978 24.57 16.157 4.388 18.211 4.342 14.014 11.348 768.24 92 7 121.978 24.57 15.955 4.319 17.979 4.223 12.191 12.863 765.87 92 8 121.978 24.57 12.584 5.652 15.246 5.474 10.474 14.638 785.99 93 1 117.693 24.766 54.168 35.559 54.321 35.691 54.207 35.585 1116.5 93 2 117.693 24.766 26.08 5.732 26.184 5.811 26.062 5.66 812.24 93 3 117.693 24.766 22.545 4.33 23.664 4.667 22.568 6.222 807.49 93 4 117.693 24.766 20.032 4.122 22.617 4.288 19.933 6.519 816.69 93 5 117.693 24.766 18.56 4.055 20.814 4.051 17.4 8.306 807.97 93 6 117.693 24.766 17.549 4.163 19.731 4.071 15.145 10.583 805.07 93 7 117.693 24.766 14.943 4.869 18.198 4.586 12.911 12.577 821.89 93 8 117.693 24.766 14.902 4.846 17.295 4.66 10.896 14.308 811.9 94 1 124.973 25.503 70.225 46.018 71.034 46.757 70.749 46.464 1247.91 94 2 124.973 25.503 32.271 12.447 32.391 12.496 32.207 12.777 913.57 94 3 124.973 25.503 22.838 6.098 23.282 6.169 22.607 6.532 794.91 94 4 124.973 25.503 19.737 5.76 21.17 5.925 19.461 7.667 795.28 94 5 124.973 25.503 18.245 5.66 20.408 5.746 16.885 10.391 795.92 94 6 124.973 25.503 16.226 5.971 18.636 5.783 14.629 12.418 801.99 94 7 124.973 25.503 16.087 5.803 18.287 5.698 12.565 13.75 799.47 94 8 124.973 25.503 14.904 6.062 17.342 5.931 10.531 16.03 802.26 95 1 118.986 23.752 32.913 8.293 32.945 8.308 32.917 8.159 876.26 95 2 118.986 23.752 25.984 4.043 26.394 4.216 26.059 4.526 818.17 95 3 118.986 23.752 21.905 2.683 22.518 2.753 21.622 3.936 778.54 95 4 118.986 23.752 19.18 2.607 20.659 2.592 18.835 5.308 786.07 95 5 118.986 23.752 17.764 2.779 19.863 2.764 16.251 8.257 784.52 95 6 118.986 23.752 15.302 3.652 17.636 3.578 14.264 10.468 788.77 95 7 118.986 23.752 14.717 3.654 16.955 3.504 12.357 12.003 789.15 95 8 118.986 23.752 12.41 4.711 15.451 4.419 10.483 13.624 801.31 96 1 124.676 25.5 45.812 19.2 45.887 19.251 45.829 19.242 1034.3 96 2 124.676 25.5 35.007 12.49 35.247 12.693 34.734 13.591 948.04 96 3 124.676 25.5 23.622 5.927 24.059 6.119 23.684 7.123 818.24 96 4 124.676 25.5 20.224 4.223 20.844 4.19 19.779 6.28 789.63 96 5 124.676 25.5 18.149 4.66 19.766 4.588 17.26 9.246 795.11 96 6 124.676 25.5 17.678 4.481 19.402 4.463 14.764 10.703 791.23 96 7 124.676 25.5 16.218 4.888 18.316 4.804 12.825 12.715 796.23 96 8 124.676 25.5 13.702 5.787 16.455 5.517 10.891 14.647 815.32 97 1 124.969 23.581 30.185 9.012 30.206 9.023 30.175 9.066 834.14 97 2 124.969 23.581 22.822 4.255 23.326 4.245 22.75 5.172 745.78 97 3 124.969 23.581 19.799 4.164 20.749 4.246 19.711 6.134 736.34 97 4 124.969 23.581 19.828 3.69 20.817 3.764 17.299 7.462 731.87 97 5 124.969 23.581 17.923 3.936 19.648 3.925 14.976 9.877 733.12 97 6 124.969 23.581 16.428 4.19 18.005 4.193 13.054 11.468 735.61 97 7 124.969 23.581 15.506 4.405 17.397 4.342 11.281 13.043 736.93 97 8 124.969 23.581 13.616 5.031 15.854 4.914 9.521 14.553 743.2 98 1 125.592 24.401 41.276 17.071 41.339 17.117 41.285 17.117 985.1 98 2 125.592 24.401 24.071 3.31 24.148 3.32 24.045 3.477 773.16 98 3 125.592 24.401 20.602 3.098 21.061 3.12 20.38 4.686 750.53 98 4 125.592 24.401 17.99 3.536 19.244 3.523 17.513 7.444 747.09 98 5 125.592 24.401 15.753 4.457 17.447 4.399 15.436 9.581 745.66 98 6 125.592 24.401 14.568 4.628 16.64 4.531 13.383 11.4 748.69 98 7 125.592 24.401 13.245 5.084 15.957 4.884 11.424 13.356 750.47 98 8 125.592 24.401 12.704 5.131 15.423 4.902 9.772 14.926 750.69 99 1 124.491 24.523 60.102 36.065 60.334 36.256 60.217 36.153 1167.24 99 2 124.491 24.523 35.257 14.098 35.659 14.362 35.367 13.998 962.47 99 3 124.491 24.523 23.936 5.251 24.264 5.284 23.834 5.443 822.97 99 4 124.491 24.523 20.564 4.009 22.045 4.304 20.56 4.554 822.19 99 5 124.491 24.523 18.768 3.9 21.063 4.021 18.082 7.395 817.37 99 6 124.491 24.523 16.474 4.308 19.315 4.217 15.448 9.522 828.31 99 7 124.491 24.523 14.186 5.06 17.036 4.812 12.743 11.905 833.75 99 8 124.491 24.523 15.328 4.557 17.644 4.392 10.998 13.786 810.16 100 1 118.197 23.481 40.042 22.958 40.101 23.004 40.045 22.965 970.32 100 2 118.197 23.481 27.867 11.99 28.86 12.541 28.223 11.928 859.76 100 3 118.197 23.481 20.223 4.285 20.782 4.402 20.211 4.715 753.28 100 4 118.197 23.481 19.175 4.345 20.361 4.429 17.979 6.794 745.89 100 5 118.197 23.481 16.608 4.473 19.486 4.328 15.496 8.979 766.52 100 6 118.197 23.481 15.487 4.658 18.346 4.419 13.31 11.318 765.54 100 7 118.197 23.481 15.546 4.697 17.67 4.521 11.297 12.774 758.88 100 8 118.197 23.481 11.413 6.104 14.266 5.872 9.428 14.667 781.93 > > >