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<-8 > 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="")) + } 71 1 128.53 25.601 52.644 24.025 52.749 24.099 52.638 23.994 1101.92 71 2 128.53 25.601 23.514 2.036 23.563 2.047 23.487 2.177 761.59 71 3 128.53 25.601 21.134 2.299 22.46 2.26 20.774 4.833 764.77 71 4 128.53 25.601 19.213 2.648 21.658 2.517 18.528 7.094 771.15 71 5 128.53 25.601 17.973 2.898 20.171 2.797 16.289 9.371 772.34 71 6 128.53 25.601 16.247 3.381 19.548 3.097 14.16 11.476 779.07 71 7 128.53 25.601 15.046 3.782 18.201 3.529 12.018 13.617 782.16 71 8 128.53 25.601 14.427 3.986 17.19 3.748 9.986 15.683 781.73 72 1 119.754 23.85 24.036 2.202 24.045 2.203 24.031 2.168 724.94 72 2 119.754 23.85 21.226 2.055 22.006 2.053 21.14 3.638 723.04 72 3 119.754 23.85 19.163 2.306 21.242 2.212 18.89 6.058 729.26 72 4 119.754 23.85 18.677 2.295 20.654 2.271 16.798 7.709 726.67 72 5 119.754 23.85 17.159 2.577 19.53 2.528 14.741 10.242 730.99 72 6 119.754 23.85 16.288 2.768 18.611 2.741 12.72 12.155 731.68 72 7 119.754 23.85 14.494 3.366 16.232 3.348 10.848 13.153 735.46 72 8 119.754 23.85 16.541 2.668 18.076 2.613 9.403 14.511 729.85 73 1 123.426 26.611 36.779 14.615 36.818 14.64 36.781 14.617 929.58 73 2 123.426 26.611 24.61 2.583 24.758 2.651 24.497 2.132 784.7 73 3 123.426 26.611 21.487 3.307 22.505 3.266 21.316 5.434 780.46 73 4 123.426 26.611 19.657 3.605 21.882 3.481 18.812 7.949 781.82 73 5 123.426 26.611 18.247 4.003 20.753 3.812 16.396 10.495 780.47 73 6 123.426 26.611 16.768 4.52 19.088 4.387 14.21 12.787 781.07 73 7 123.426 26.611 15.976 4.744 18.248 4.545 12.022 15.027 780.37 73 8 123.426 26.611 12.308 6.762 14.811 6.635 10.359 16.403 786.06 74 1 125.023 24.534 39.97 14.992 40.029 15.034 39.995 15.022 969.96 74 2 125.023 24.534 22.519 1.917 22.596 1.965 22.494 2.175 740.61 74 3 125.023 24.534 20.284 2.105 22.122 1.983 19.944 4.706 748.95 74 4 125.023 24.534 18.283 2.597 19.771 2.533 17.572 7.085 750.96 74 5 125.023 24.534 18.529 2.375 20.304 2.3 15.522 9.144 749.83 74 6 125.023 24.534 17.056 2.741 19.14 2.618 13.695 10.956 753.78 74 7 125.023 24.534 14.072 3.994 16.801 3.78 12.012 12.512 763.7 74 8 125.023 24.534 14.729 3.522 17.133 3.336 10.434 14.189 762 75 1 123.613 25.659 34.218 10.159 34.251 10.179 34.205 10.187 894.49 75 2 123.613 25.659 23.091 2.593 23.157 2.599 23.028 2.862 750.87 75 3 123.613 25.659 22.173 2.643 23.091 2.623 20.63 5.268 754.7 75 4 123.613 25.659 19.956 2.793 21.856 2.725 18.493 7.456 763.97 75 5 123.613 25.659 18.601 3.031 21.058 2.91 16.331 9.671 768.29 75 6 123.613 25.659 18.038 3.142 20.632 3.003 14.163 11.841 770.58 75 7 123.613 25.659 15.685 3.745 18.478 3.557 12.179 13.928 779.35 75 8 123.613 25.659 17.061 3.356 19.299 3.262 10.235 15.618 774.37 76 1 125.705 22.797 24.71 2.485 24.72 2.486 24.706 2.526 738.24 76 2 125.705 22.797 20.348 1.707 20.532 1.707 20.297 2.482 693.36 76 3 125.705 22.797 18.326 1.888 20.121 1.78 17.968 4.829 701.45 76 4 125.705 22.797 18.5 1.732 19.906 1.682 15.696 7.082 700.21 76 5 125.705 22.797 15.042 2.749 17.087 2.63 13.939 8.826 709.5 76 6 125.705 22.797 13.462 3.382 16.117 3.189 12.166 10.645 713.88 76 7 125.705 22.797 12.959 3.39 15.765 3.13 10.577 12.233 716.48 76 8 125.705 22.797 12.25 3.6 14.649 3.368 8.888 13.949 720.12 77 1 125.922 24.945 32.906 12.159 32.928 12.17 32.9 12.216 875.87 77 2 125.922 24.945 22.506 2.746 22.595 2.737 22.498 2.693 741.28 77 3 125.922 24.945 21.257 2.789 22.436 2.763 20.182 5.12 744.93 77 4 125.922 24.945 19.149 2.978 21.449 2.899 18.165 7.03 756.54 77 5 125.922 24.945 17.646 3.272 20.157 3.115 15.939 9.337 764.14 77 6 125.922 24.945 17.131 3.432 19.621 3.284 14.126 11.018 762.41 77 7 125.922 24.945 16.869 3.489 19.099 3.344 12.464 12.668 761.52 77 8 125.922 24.945 15.159 4.003 17.574 3.842 10.915 14.104 768.8 78 1 125.237 24.233 29.467 9.11 29.484 9.119 29.466 9.14 822.84 78 2 125.237 24.233 21.875 2.587 22.013 2.599 21.701 2.478 728.4 78 3 125.237 24.233 20.103 2.681 21.702 2.624 19.74 4.422 738.37 78 4 125.237 24.233 18.362 2.887 20.648 2.79 17.74 6.562 747.69 78 5 125.237 24.233 17.647 3.113 19.906 2.963 15.787 8.449 746.26 78 6 125.237 24.233 16.326 3.409 18.853 3.231 13.889 10.603 753.75 78 7 125.237 24.233 16.426 3.445 18.392 3.317 12.002 12.473 749.41 78 8 125.237 24.233 13.491 4.212 16.632 3.891 10.327 13.956 771.24 79 1 115.512 24.122 23.819 1.619 23.828 1.619 23.812 1.506 720.53 79 2 115.512 24.122 21.924 1.536 22.881 1.52 21.451 3.005 724.81 79 3 115.512 24.122 20.13 1.675 21.992 1.607 19.33 5.075 731.61 79 4 115.512 24.122 20.049 1.689 21.54 1.652 17.304 6.933 727.33 79 5 115.512 24.122 17.252 2.151 20.104 1.968 15.069 9.478 741.17 79 6 115.512 24.122 16.442 2.341 18.931 2.205 13.154 11.26 742.19 79 7 115.512 24.122 14.934 2.769 17.842 2.581 11.221 13.371 748.36 79 8 115.512 24.122 14.616 2.883 17.071 2.726 9.531 14.789 746.3 80 1 121.452 25.132 25.543 2.165 25.552 2.166 25.537 2.121 754.17 80 2 121.452 25.132 22.747 1.83 24.053 1.838 22.84 4.801 759.26 80 3 121.452 25.132 21.068 1.896 23.004 1.844 20.151 6.04 758.32 80 4 121.452 25.132 18.656 2.406 21.581 2.242 17.77 8.31 762.66 80 5 121.452 25.132 17.254 2.679 19.919 2.523 15.55 10.428 763.57 80 6 121.452 25.132 16.469 2.85 19.064 2.668 13.492 12.019 763.53 80 7 121.452 25.132 16.225 2.865 18.837 2.688 11.308 14.478 761.84 80 8 121.452 25.132 13.77 3.881 16.39 3.663 9.615 15.822 762.17 > > > >