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<-9 > 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="")) + } 81 1 116.201 22.29 38.412 17.446 38.459 17.474 38.399 17.284 949.98 81 2 116.201 22.29 21.293 2.904 21.401 2.954 21.147 2.817 714.28 81 3 116.201 22.29 18.618 3.045 19.475 3.061 18.106 4.861 708.94 81 4 116.201 22.29 16.459 3.502 17.758 3.478 15.971 6.66 710.25 81 5 116.201 22.29 15.767 3.623 17.218 3.484 13.744 8.737 705.53 81 6 116.201 22.29 13.307 4.509 15.268 4.398 12.049 10.369 710.38 81 7 116.201 22.29 13.399 4.32 15.339 4.223 10.365 11.942 709.38 81 8 116.201 22.29 11.767 5.031 13.913 4.826 9.01 13.506 714.69 82 1 131.421 23.444 29.611 9.227 29.629 9.236 29.61 9.308 825.17 82 2 131.421 23.444 24.079 6.085 24.519 6.233 24.136 6.418 779.76 82 3 131.421 23.444 20.401 5.097 21.589 5.118 20.513 6.659 764.25 82 4 131.421 23.444 17.94 5.176 19.677 5.311 17.67 9.138 763.38 82 5 131.421 23.444 16.11 5.41 17.979 5.503 15.358 10.235 758.87 82 6 131.421 23.444 14.212 5.879 16.388 5.787 13.264 11.119 757.9 82 7 131.421 23.444 13.952 5.722 15.876 5.638 11.733 13.118 749.29 82 8 131.421 23.444 12.246 6.324 14.57 6.189 10.136 14.446 757.77 83 1 117.099 21.783 24.793 5.099 24.804 5.104 24.783 5.044 739.57 83 2 117.099 21.783 20.448 2.336 20.639 2.363 20.147 2.975 689.39 83 3 117.099 21.783 18.561 2.56 19.953 2.539 17.574 5.556 691.54 83 4 117.099 21.783 16.038 3.391 17.836 3.369 15.66 6.558 696.67 83 5 117.099 21.783 14.986 3.476 17.418 3.379 13.735 8.407 700.43 83 6 117.099 21.783 13.237 4.012 15.753 3.96 11.943 10.219 711.36 83 7 117.099 21.783 13.994 3.47 16.267 3.415 10.419 11.655 705.72 83 8 117.099 21.783 11.154 4.644 13.567 4.451 8.841 13.347 720.01 84 1 120.415 25.659 32.205 7.82 32.231 7.833 32.203 7.719 865.51 84 2 120.415 25.659 24.684 3.165 24.988 3.168 24.671 3.472 788.76 84 3 120.415 25.659 21.812 3.205 23.247 3.258 21.448 6.032 792.92 84 4 120.415 25.659 19.993 3.194 22.545 3.189 18.962 7.496 799.38 84 5 120.415 25.659 18.796 3.297 21.35 3.121 16.639 9.54 797.36 84 6 120.415 25.659 16.335 3.914 19.487 3.661 14.441 11.734 806 84 7 120.415 25.659 15.707 4.058 18.562 3.852 12.312 13.655 799.25 84 8 120.415 25.659 15.751 3.954 18.01 3.757 10.478 15.654 796.24 85 1 129.724 24.746 46.251 23.533 46.323 23.587 46.256 23.625 1039.76 85 2 129.724 24.746 31.962 10.902 32.384 11.186 32.072 11.357 915.16 85 3 129.724 24.746 24.685 6.155 25.001 6.293 24.351 6.226 833.09 85 4 129.724 24.746 20.922 4.56 21.635 4.701 20.477 5.125 807.3 85 5 129.724 24.746 19.487 4.609 21.281 4.662 18.234 7.487 815.41 85 6 129.724 24.746 17.746 4.717 20.493 4.652 16.222 9.1 829.29 85 7 129.724 24.746 18.404 4.49 20.482 4.416 14.193 11.165 816.99 85 8 129.724 24.746 17.206 4.624 19.506 4.493 12.182 13.292 824.76 86 1 133.17 26.36 25.804 2.133 25.814 2.134 25.799 2.192 759.09 86 2 133.17 26.36 24.098 1.921 25.119 1.917 23.142 4.044 763.09 86 3 133.17 26.36 21.908 2.038 23.962 1.955 20.695 6.582 771.05 86 4 133.17 26.36 19.97 2.327 22.374 2.207 18.538 7.983 776.38 86 5 133.17 26.36 19.321 2.378 21.797 2.266 16.352 10.322 776.11 86 6 133.17 26.36 16.406 3.312 19.506 3.104 14.604 11.98 790.27 86 7 133.17 26.36 15.149 3.752 18.672 3.451 12.776 13.74 794.54 86 8 133.17 26.36 14.101 4.106 17.618 3.775 10.914 15.909 800.02 87 1 124.957 25.372 29.007 4.61 29.025 4.615 29.003 4.589 815.27 87 2 124.957 25.372 23.294 3.855 23.724 3.966 23.359 5.093 765.05 87 3 124.957 25.372 20.211 3.426 20.788 3.4 19.984 5.422 740.38 87 4 124.957 25.372 18.607 3.605 20.2 3.506 17.563 7.953 742.67 87 5 124.957 25.372 18.644 3.458 19.915 3.374 15.626 9.896 742.57 87 6 124.957 25.372 14.938 4.718 17.535 4.465 13.446 12.098 754.94 87 7 124.957 25.372 15.375 4.33 17.589 4.155 11.503 14.12 752.1 87 8 124.957 25.372 14.594 4.587 17.053 4.383 9.799 15.899 751.9 88 1 122.243 24.717 44.372 22.822 44.453 22.882 44.388 22.898 1020.05 88 2 122.243 24.717 26.697 9.542 26.959 9.626 26.621 9.783 826.78 88 3 122.243 24.717 19.845 5.599 20.325 5.762 19.854 5.885 736.15 88 4 122.243 24.717 18.563 5.531 19.825 5.51 17.743 8.009 737.63 88 5 122.243 24.717 17.617 5.612 19.087 5.649 15.773 9.972 742.43 88 6 122.243 24.717 15.579 5.935 18.159 5.837 13.858 11.678 760.21 88 7 122.243 24.717 13.938 6.311 17.125 6.075 11.972 13.318 772.33 88 8 122.243 24.717 13.955 6.242 16.844 6.15 10.331 14.677 765.68 89 1 123.794 24.258 52.389 29.134 52.516 29.226 52.408 29.122 1099.54 89 2 123.794 24.258 33.549 15.253 33.881 15.48 33.622 15.697 935.59 89 3 123.794 24.258 21.718 5.772 22.055 5.935 21.555 6.046 785.37 89 4 123.794 24.258 19.153 4.628 19.746 4.592 18.879 5.924 763.8 89 5 123.794 24.258 17.705 4.835 19.159 4.79 16.41 8.976 770.61 89 6 123.794 24.258 16.261 5.141 18.34 5.066 14.16 11.219 774.42 89 7 123.794 24.258 14.591 5.584 17.139 5.41 12.051 13.122 781.13 89 8 123.794 24.258 14.229 5.646 16.639 5.508 10.376 14.546 776.44 90 1 113.793 23.924 58.684 37.26 58.815 37.371 58.651 36.79 1153.89 90 2 113.793 23.924 25.844 6.593 25.911 6.656 25.793 6.329 806.74 90 3 113.793 23.924 22.419 4.935 23.57 5.227 22.559 5.839 801.75 90 4 113.793 23.924 20.174 4.11 21.573 4.147 19.574 6.939 794.28 90 5 113.793 23.924 19.652 4.008 21.516 3.957 17.214 9.11 787.99 90 6 113.793 23.924 17.136 4.402 19.611 4.263 14.83 11.019 798.16 90 7 113.793 23.924 15.881 4.55 18.681 4.452 13.001 12.713 802.7 90 8 113.793 23.924 14.221 5.088 17.018 4.864 11.084 13.313 806.45 > > > >