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<-5 > 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="")) + } 41 1 121.285 21.884 25.035 5.58 25.046 5.585 25.033 5.608 744.58 41 2 121.285 21.884 21.239 3.482 21.718 3.551 21.121 4.436 723.07 41 3 121.285 21.884 18.756 3.242 20.933 3.189 18.639 4.576 732.29 41 4 121.285 21.884 17.123 3.046 19.489 2.953 16.258 7.123 729.84 41 5 121.285 21.884 15.584 3.267 17.597 3.261 13.995 9.333 728.88 41 6 121.285 21.884 13.109 4.248 15.376 4.102 12.266 10.715 730.06 41 7 121.285 21.884 13.249 3.813 15.367 3.687 10.444 12.125 723.4 41 8 121.285 21.884 11.756 4.459 14.257 4.293 8.834 13.268 724.95 42 1 119.238 24.544 47.915 25.569 48.01 25.638 47.949 25.548 1057.14 42 2 119.238 24.544 31.207 12.067 31.591 12.337 31.155 12.304 901.46 42 3 119.238 24.544 22.802 6.73 23.082 6.781 22.709 7.188 792.46 42 4 119.238 24.544 19.351 5.447 20.259 5.676 18.558 7.329 754.02 42 5 119.238 24.544 17.585 5.666 19.282 5.769 16.088 9.867 759.72 42 6 119.238 24.544 15.048 6.487 17.073 6.532 14.153 11.211 771.21 42 7 119.238 24.544 14.864 6.057 17.167 6.108 12.346 13.355 770.88 42 8 119.238 24.544 13.459 6.482 15.981 6.382 10.618 14.877 778.89 43 1 127.001 26.865 76.66 55.442 78.085 56.828 77.555 56.857 1294.11 43 2 127.001 26.865 32.453 11.632 32.617 11.733 32.286 11.706 915.91 43 3 127.001 26.865 23.916 6.475 24.167 6.56 23.594 7.399 817.08 43 4 127.001 26.865 21.345 5.743 22.767 5.858 20.597 7.409 826.99 43 5 127.001 26.865 19.897 5.471 21.511 5.455 18.613 9.795 825.53 43 6 127.001 26.865 19.155 5.396 21.221 5.379 16.65 11.053 826.71 43 7 127.001 26.865 18.919 5.218 20.846 5.129 14.587 12.925 828.62 43 8 127.001 26.865 17.641 5.538 20.085 5.379 12.765 14.373 835.59 44 1 127.57 25.494 27.997 3.788 28.012 3.792 27.992 3.799 798.33 44 2 127.57 25.494 24.21 3.216 24.971 3.278 24.273 4.464 789.26 44 3 127.57 25.494 21.583 2.818 22.579 2.814 21.361 4.575 779.84 44 4 127.57 25.494 19.729 3.009 21.776 3.001 18.831 6.885 786.03 44 5 127.57 25.494 18.796 3.177 21.029 3.152 16.257 9.364 782.54 44 6 127.57 25.494 16.885 3.586 19.342 3.486 14.318 11.221 789.96 44 7 127.57 25.494 17.783 3.326 19.741 3.242 12.374 13.468 781.99 44 8 127.57 25.494 13.993 4.598 17.087 4.349 10.511 15.746 799.32 45 1 119.219 23.763 29.968 7.027 29.992 7.037 29.972 6.993 831.04 45 2 119.219 23.763 22.695 3.681 22.914 3.662 22.687 4.018 748.25 45 3 119.219 23.763 19.392 3.684 19.828 3.718 19.136 5.764 717.07 45 4 119.219 23.763 17.02 4.318 18.05 4.363 16.533 8.299 719.12 45 5 119.219 23.763 17.701 3.595 18.83 3.606 14.635 9.737 719.18 45 6 119.219 23.763 14.722 4.713 16.832 4.698 12.833 11.501 726.65 45 7 119.219 23.763 13.666 5.009 15.947 4.898 11.315 12.792 732.53 45 8 119.219 23.763 14.913 4.205 16.52 4.146 9.772 14.243 728.6 46 1 127.78 23.858 46.273 25.203 46.367 25.279 46.312 25.495 1040.41 46 2 127.78 23.858 25.796 6.789 26.159 6.853 25.893 7.008 807.33 46 3 127.78 23.858 20.68 4.605 21.265 4.631 20.734 6.406 755.92 46 4 127.78 23.858 18.91 4.339 20.439 4.486 17.83 7.311 753.89 46 5 127.78 23.858 16.122 4.98 18.287 4.809 15.396 10.448 757.89 46 6 127.78 23.858 13.798 5.889 16.235 5.768 13.316 11.876 756.87 46 7 127.78 23.858 12.21 6.526 14.847 6.347 11.147 13.607 759.09 46 8 127.78 23.858 14.456 5.204 16.133 5.145 9.526 14.835 750.63 47 1 119.162 21.182 62.424 42.314 62.717 42.577 62.546 42.183 1185.87 47 2 119.162 21.182 39.799 21.11 40.519 21.742 40.188 21.354 1026.19 47 3 119.162 21.182 19.588 3.948 19.786 4.034 19.43 4.141 721.94 47 4 119.162 21.182 16.89 3.477 17.706 3.478 16.797 4.962 716.38 47 5 119.162 21.182 15.18 3.804 16.23 3.742 14.726 7.02 710.31 47 6 119.162 21.182 14.468 3.899 16.449 3.716 12.774 8.707 709.58 47 7 119.162 21.182 13.57 4.123 15.541 3.968 10.879 10.454 711.41 47 8 119.162 21.182 12.017 4.578 14.329 4.417 9.274 11.993 715.39 48 1 122.61 22.852 41.002 17.636 41.069 17.684 41.001 17.674 981.29 48 2 122.61 22.852 25.711 6.846 25.855 6.933 25.739 7.182 805.5 48 3 122.61 22.852 20.288 3.016 21.081 2.862 20.367 3.513 750.17 48 4 122.61 22.852 18.296 3.103 19.786 3.11 17.658 5.963 756.19 48 5 122.61 22.852 18.418 3.033 20.258 3.134 15.539 7.963 750.38 48 6 122.61 22.852 16.279 3.347 18.325 3.297 13.745 9.588 759.93 48 7 122.61 22.852 13.892 3.978 16.68 3.894 12.002 11.184 773.02 48 8 122.61 22.852 14.811 3.624 17.071 3.493 10.382 13.328 763.12 49 1 129.287 27.412 39.8 16.327 39.834 16.349 39.775 16.528 966.44 49 2 129.287 27.412 28.583 7.611 28.772 7.648 28.588 8.063 857.02 49 3 129.287 27.412 24.443 5.584 25.238 5.687 23.937 6.386 840.04 49 4 129.287 27.412 21.828 5.178 23.856 5.231 21.134 6.712 846.68 49 5 129.287 27.412 20.619 5.06 22.889 4.955 18.736 9.193 845.24 49 6 129.287 27.412 20.445 4.864 22.515 4.748 16.542 11.602 836.87 49 7 129.287 27.412 19.067 5.019 21.265 4.907 14.299 13.466 840.7 49 8 129.287 27.412 17.898 5.269 20.254 5.164 12.347 15.852 843.53 50 1 119.594 24.826 26.374 3.416 26.387 3.419 26.359 3.422 769.28 50 2 119.594 24.826 23.786 2.879 24.94 3.02 23.311 4.153 768.99 50 3 119.594 24.826 21.851 2.753 23.152 2.867 20.612 5.857 766.46 50 4 119.594 24.826 19.312 3.045 21.548 3.024 18.218 8.232 769.71 50 5 119.594 24.826 17.774 3.273 20.368 3.214 15.681 10.1 775.14 50 6 119.594 24.826 17.6 3.232 19.688 3.169 13.584 12.097 770.81 50 7 119.594 24.826 18.053 3.074 19.836 3.015 11.958 13.583 769.31 50 8 119.594 24.826 13.058 4.842 15.906 4.642 10.122 15.888 794.5 > > > >