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<-1 > 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="")) + } 1 1 119.501 22.347 31.07 13.897 31.093 13.91 31.064 13.969 848.37 1 2 119.501 22.347 19.937 2.845 19.999 2.859 19.889 2.708 681.18 1 3 119.501 22.347 17.899 2.993 19.069 2.989 17.6 4.97 689.97 1 4 119.501 22.347 16.676 3.196 18.48 3.108 15.717 6.83 691.71 1 5 119.501 22.347 14.705 3.712 17.404 3.532 13.796 8.711 702.49 1 6 119.501 22.347 14.787 3.637 17.007 3.498 11.918 10.705 695.6 1 7 119.501 22.347 13.194 4.112 15.959 3.903 10.356 12.216 704.81 1 8 119.501 22.347 12.349 4.403 14.628 4.251 8.823 13.809 708.71 2 1 124.271 24.784 25.666 2.77 25.678 2.772 25.667 2.762 756.45 2 2 124.271 24.784 22.408 2.046 22.748 2.061 22.032 3.33 733.45 2 3 124.271 24.784 19.665 2.451 21.212 2.43 19.451 5.609 743.05 2 4 124.271 24.784 17.599 2.972 20.09 2.809 17.098 7.885 745.39 2 5 124.271 24.784 17.533 2.805 19.526 2.691 15.197 9.779 740.7 2 6 124.271 24.784 14.789 3.785 17.639 3.55 13.278 11.683 752.96 2 7 124.271 24.784 15.951 3.163 18.053 3.022 11.494 13.594 743.17 2 8 124.271 24.784 14.564 3.668 16.931 3.46 9.899 14.838 747.36 3 1 131.124 26.743 46.743 23.242 46.814 23.292 46.723 23.422 1043.6 3 2 131.124 26.743 24.654 2.236 24.704 2.24 24.609 2.255 784.28 3 3 131.124 26.743 22.435 2.443 24.273 2.302 21.887 4.955 787.31 3 4 131.124 26.743 21.155 2.614 22.91 2.552 19.486 7.335 790.29 3 5 131.124 26.743 18.565 3.205 21.41 3.056 17.148 9.788 801.76 3 6 131.124 26.743 19.625 2.892 21.665 2.801 15.198 11.521 795.66 3 7 131.124 26.743 16.69 3.679 19.764 3.445 12.964 13.771 807.26 3 8 131.124 26.743 17.324 3.492 19.541 3.357 11.028 15.779 802.83 4 1 117 23.686 42.451 19.564 42.527 19.621 42.453 19.295 998.17 4 2 117 23.686 21.669 2.127 21.755 2.202 21.628 2.103 720.86 4 3 117 23.686 19.424 2.37 21.487 2.128 18.646 5.036 719.77 4 4 117 23.686 18.642 2.402 20.058 2.355 16.797 6.96 724.37 4 5 117 23.686 15.694 3.469 18.391 3.28 14.967 8.762 725.77 4 6 117 23.686 15.471 3.316 18.023 3.122 13.062 10.668 727.05 4 7 117 23.686 14.724 3.52 17.059 3.34 11.293 12.362 730.39 4 8 117 23.686 12.705 4.298 15.653 4.005 9.71 14.1 738.82 5 1 131.168 26.226 34.179 10.466 34.203 10.481 34.16 10.623 893.49 5 2 131.168 26.226 23.856 1.867 24.141 1.765 23.821 2.606 768.27 5 3 131.168 26.226 22.12 2.039 23.757 1.938 21.39 5.186 773.73 5 4 131.168 26.226 21.42 2.076 22.961 2.055 18.973 7.348 775.44 5 5 131.168 26.226 19.955 2.281 22.242 2.138 16.817 9.487 781.44 5 6 131.168 26.226 18.215 2.742 20.803 2.594 14.718 11.579 787.56 5 7 131.168 26.226 17.201 3.006 19.77 2.82 12.876 13.367 794.24 5 8 131.168 26.226 16.333 3.28 18.972 3.115 10.767 15.626 796.49 6 1 118.925 22.805 51.063 31.786 51.252 31.952 51.17 31.943 1088.9 6 2 118.925 22.805 21.298 1.642 21.431 1.724 21.239 1.513 715.71 6 3 118.925 22.805 18.838 2.331 19.415 2.235 18.652 4.133 708.84 6 4 118.925 22.805 18.604 2.181 19.415 2.146 16.472 6.408 705.7 6 5 118.925 22.805 17.318 2.502 18.897 2.391 14.54 8.565 710.47 6 6 118.925 22.805 14.855 3.215 17.194 3.068 12.802 10.099 722.04 6 7 118.925 22.805 14.857 3.084 16.811 2.988 11.057 11.949 720.68 6 8 118.925 22.805 14.178 3.261 16.296 3.125 9.332 13.649 726.25 7 1 123.761 26.767 31.905 9.864 31.93 9.879 31.893 9.912 860.84 7 2 123.761 26.767 23.986 3.119 24.173 3.122 24.006 3.115 773.87 7 3 123.761 26.767 21.12 3.578 23.154 3.359 21.039 5.948 776.74 7 4 123.761 26.767 19.406 4.261 20.504 4.235 18.365 8.852 764.38 7 5 123.761 26.767 18.291 4.535 20.127 4.47 16.108 11.08 767.13 7 6 123.761 26.767 16.712 4.948 19.082 4.81 14.026 13.305 769.81 7 7 123.761 26.767 16.848 4.808 18.908 4.695 12.066 15.408 772.2 7 8 123.761 26.767 14.309 5.735 16.935 5.558 10.455 17.025 778.55 8 1 122.531 22.569 54.063 32.403 54.197 32.515 54.113 32.472 1115.04 8 2 122.531 22.569 20.846 1.681 20.881 1.724 20.809 1.763 702.96 8 3 122.531 22.569 18.972 1.807 20.752 1.698 18.362 4.227 707.35 8 4 122.531 22.569 17.381 2.088 18.949 1.997 16.034 6.563 708.76 8 5 122.531 22.569 15.852 2.548 17.683 2.438 14.102 8.602 708.76 8 6 122.531 22.569 13.309 3.843 15.73 3.67 12.49 10.098 713.04 8 7 122.531 22.569 14.743 2.798 16.884 2.651 10.778 11.898 711.88 8 8 122.531 22.569 11.016 4.751 14.23 4.401 9.18 13.475 728.04 9 1 124.318 25.52 41.347 22.675 41.412 22.726 41.335 22.895 985.56 9 2 124.318 25.52 22.382 3.423 22.451 3.439 22.339 3.317 737.16 9 3 124.318 25.52 21.057 3.453 22.314 3.421 19.924 5.725 741.41 9 4 124.318 25.52 18.507 3.814 20.701 3.707 17.545 8.151 749.1 9 5 124.318 25.52 17.492 4.001 20.287 3.807 15.411 10.276 751.98 9 6 124.318 25.52 18.219 3.826 20.278 3.738 13.567 12.202 752.02 9 7 124.318 25.52 17.077 4.069 19.281 3.969 11.581 14.034 755.85 9 8 124.318 25.52 15.314 4.538 17.39 4.426 9.927 15.721 760.37 10 1 121.787 26.344 39.771 18.263 39.824 18.305 39.783 18.291 967.29 10 2 121.787 26.344 24.481 1.885 24.663 1.82 24.441 1.844 785.14 10 3 121.787 26.344 22.602 1.94 24.434 1.884 21.749 4.62 792.64 10 4 121.787 26.344 20.096 2.357 22.848 2.18 19.344 6.976 803.37 10 5 121.787 26.344 21.015 2.144 23.11 2.055 17.305 9.101 796.95 10 6 121.787 26.344 18.683 2.553 21.422 2.379 15.069 11.292 804.4 10 7 121.787 26.344 15.771 3.472 18.847 3.198 13.096 13.301 816.04 10 8 121.787 26.344 13.774 4.35 17.438 3.917 11.082 15.32 822.13 > > > >