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<-2 > 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="")) + } 11 1 129.662 24.8 40.352 17.49 40.4 17.523 40.37 17.621 974.23 11 2 129.662 24.8 24.201 3.666 24.288 3.661 23.966 3.809 776.44 11 3 129.662 24.8 21.098 3.37 22.454 3.407 21.07 6.514 778.82 11 4 129.662 24.8 18.607 3.815 20.188 3.877 18.456 7.273 770.48 11 5 129.662 24.8 16.202 4.526 18.152 4.377 15.817 9.763 764.91 11 6 129.662 24.8 15.43 4.644 17.594 4.552 13.364 11.961 756.44 11 7 129.662 24.8 13.092 5.826 15.185 5.668 11.381 13.747 752.47 11 8 129.662 24.8 12.519 5.948 14.331 5.776 9.962 14.93 752.97 12 1 124.121 24.895 24.18 0.962 24.189 0.963 24.176 0.93 727.77 12 2 124.121 24.895 21.689 1.363 22.525 1.356 21.417 3.692 728.6 12 3 124.121 24.895 20.219 1.513 22.027 1.467 19.208 5.891 733.16 12 4 124.121 24.895 18.089 2.013 21.052 1.831 17.092 8.006 740.03 12 5 124.121 24.895 18.185 1.916 20.468 1.802 15.029 10.094 735.6 12 6 124.121 24.895 15.988 2.567 18.707 2.365 13.109 11.923 742.7 12 7 124.121 24.895 16.159 2.476 18.324 2.346 11.183 13.929 739.74 12 8 124.121 24.895 14.598 3.029 16.988 2.862 9.61 15.414 742.44 13 1 128.926 25.732 31.871 8.327 31.887 8.333 31.87 8.374 860.59 13 2 128.926 25.732 23.91 3.995 24.093 4.017 23.933 4.512 771.25 13 3 128.926 25.732 21.29 4.392 22.145 4.443 20.991 6.939 767.22 13 4 128.926 25.732 19.718 4.505 21.849 4.485 18.718 8.979 773.16 13 5 128.926 25.732 18.605 4.604 21.399 4.589 16.591 11.581 775.4 13 6 128.926 25.732 16.283 5.201 19.202 5.205 14.584 12.655 786.58 13 7 128.926 25.732 14.274 5.9 18.176 5.701 12.299 15.105 795 13 8 128.926 25.732 14.812 5.498 17.355 5.478 10.575 17.132 784.94 14 1 124.08 25.543 51.567 30.364 51.638 30.414 51.559 30.418 1091.79 14 2 124.08 25.543 38.544 18.556 39.279 19.129 38.754 19.24 1008.06 14 3 124.08 25.543 26.573 9.729 26.888 9.851 26.49 10.153 870.53 14 4 124.08 25.543 20.946 5.696 21.372 5.735 20.567 5.795 808.14 14 5 124.08 25.543 18.969 5.962 20.836 5.935 18.443 8.03 819.4 14 6 124.08 25.543 17.233 6.232 19.867 6.242 15.998 10.391 829.12 14 7 124.08 25.543 16.004 6.321 18.946 6.217 13.947 12.762 834.39 14 8 124.08 25.543 15.027 6.416 17.863 6.323 12.082 14.03 838.26 15 1 123.744 26.561 25.871 1.853 25.883 1.854 25.862 1.9 759.96 15 2 123.744 26.561 23.528 1.9 24.684 1.939 23.117 4.381 762.22 15 3 123.744 26.561 20.407 2.668 22.046 2.62 20.09 7.099 768.59 15 4 123.744 26.561 18.993 2.897 21.268 2.753 17.833 9.2 768.16 15 5 123.744 26.561 16.502 3.881 19.368 3.644 15.522 11.62 777.63 15 6 123.744 26.561 18.822 2.939 20.453 2.898 13.728 13.431 757.19 15 7 123.744 26.561 16.345 3.647 18.78 3.506 11.909 14.915 766.83 15 8 123.744 26.561 13.132 5.159 15.935 4.964 10.336 16.335 784.64 16 1 119.079 23.403 31.384 10.231 31.41 10.246 31.389 10.188 853.04 16 2 119.079 23.403 22.947 2.312 23.122 2.385 22.786 1.756 751.5 16 3 119.079 23.403 20.031 2.628 20.472 2.605 19.636 3.999 730.94 16 4 119.079 23.403 18.086 2.873 19.656 2.796 17.471 6.202 739.7 16 5 119.079 23.403 17.054 2.926 19.043 2.826 15.412 8.26 743.89 16 6 119.079 23.403 15.661 3.219 17.914 3.102 13.441 10.026 748.14 16 7 119.079 23.403 13.69 3.907 16.209 3.729 11.683 11.866 758.19 16 8 119.079 23.403 13.701 3.756 16.009 3.572 9.963 13.59 755.36 17 1 119.906 26.575 34.343 12.512 34.371 12.528 34.336 12.488 896.22 17 2 119.906 26.575 25.529 4.574 25.831 4.671 25.27 4.383 805.96 17 3 119.906 26.575 22.749 4.105 24.287 4.18 22.405 5.917 812.27 17 4 119.906 26.575 21.111 4.062 23.327 4.096 19.843 8.53 813.47 17 5 119.906 26.575 18.816 4.322 21.897 4.234 17.579 10.379 821.59 17 6 119.906 26.575 17.855 4.428 20.94 4.191 15.318 12.122 818.59 17 7 119.906 26.575 15.182 5.175 18.806 4.845 12.74 14.329 832.18 17 8 119.906 26.575 16.618 4.663 19.375 4.511 10.816 16.036 817.65 18 1 119.922 22.95 50.751 27.542 50.838 27.601 50.724 27.591 1083.96 18 2 119.922 22.95 23.343 5.173 23.404 5.19 23.316 5.491 757.2 18 3 119.922 22.95 19.865 4.137 20.956 4.276 19.624 5.853 740.34 18 4 119.922 22.95 18.232 4.08 20.154 4.173 17.286 7.191 741.38 18 5 119.922 22.95 15.741 4.621 17.973 4.636 15.036 9.281 746.15 18 6 119.922 22.95 15.266 4.489 17.305 4.442 13.1 10.923 739.69 18 7 119.922 22.95 12.852 5.342 15.546 5.148 11.317 12.555 753.82 18 8 119.922 22.95 13.717 4.767 15.728 4.653 9.527 14.292 739.48 19 1 120.529 25.76 57.449 35.759 57.657 35.943 57.544 35.767 1145.5 19 2 120.529 25.76 30.721 11.142 30.898 11.242 30.704 11.214 890.08 19 3 120.529 25.76 25.089 8.131 25.817 8.483 24.906 9.337 844.75 19 4 120.529 25.76 20.165 5.229 21.072 5.191 19.898 6.369 794.16 19 5 120.529 25.76 17.158 6.07 18.43 6.065 16.272 10.989 782.52 19 6 120.529 25.76 14.879 6.772 17.269 6.669 13.96 12.715 788.78 19 7 120.529 25.76 13.198 7.168 15.905 6.918 11.753 14.673 787.31 19 8 120.529 25.76 12.494 7.347 14.775 7.097 9.799 16.519 778.91 20 1 129.085 22.676 42.618 19.422 42.683 19.467 42.622 19.533 1000.24 20 2 129.085 22.676 22.12 2.199 22.175 2.207 21.994 2.443 732.45 20 3 129.085 22.676 19.858 2.024 21.292 2.092 19.586 4.682 736.19 20 4 129.085 22.676 19.002 2.035 20.403 2.07 17.287 6.695 732.96 20 5 129.085 22.676 15.873 2.764 17.999 2.754 15.057 8.301 748.21 20 6 129.085 22.676 13.918 3.514 16.422 3.252 12.946 10.327 750.05 20 7 129.085 22.676 13.557 3.467 15.926 3.373 11.119 12.126 749.43 20 8 129.085 22.676 14.776 3 16.851 2.921 9.411 13.635 740.94 > > > >