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<-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 124.223 23.501 38.994 16.651 39.048 16.689 38.998 16.624 957.75 11 2 124.223 23.501 21.772 2.15 21.832 2.163 21.668 2.034 724.65 11 3 124.223 23.501 19.337 2.626 20.137 2.554 19.132 4.621 723.73 11 4 124.223 23.501 17.549 2.925 19.711 2.8 16.967 6.753 732.92 11 5 124.223 23.501 16.972 2.985 19.172 2.858 15.068 8.651 728.65 11 6 124.223 23.501 15.129 3.49 18.043 3.297 13.254 10.675 736.93 11 7 124.223 23.501 16.157 3.114 17.985 3.021 11.395 12.414 729.73 11 8 124.223 23.501 13.872 3.848 16.365 3.675 9.755 13.958 738.55 12 1 124.356 24.541 23.359 1.279 23.366 1.279 23.352 1.291 711.12 12 2 124.356 24.541 21.208 1.437 22.492 1.391 20.984 3.673 718.28 12 3 124.356 24.541 19.593 1.729 21.274 1.667 18.638 6.038 721.51 12 4 124.356 24.541 18.325 2.037 20.197 1.962 16.545 8.143 723.35 12 5 124.356 24.541 16.88 2.458 18.808 2.376 14.448 10.276 726.4 12 6 124.356 24.541 15.984 2.694 18.333 2.546 12.752 11.952 729.02 12 7 124.356 24.541 13.728 3.607 16.304 3.423 11.187 13.518 741.06 12 8 124.356 24.541 12.122 4.466 15.086 4.204 9.637 15.074 746.77 13 1 122.578 24.172 29.37 6.291 29.386 6.295 29.367 6.292 821.33 13 2 122.578 24.172 22.181 1.929 22.311 1.937 22.163 2.229 733.65 13 3 122.578 24.172 20.114 2.068 21.489 2.023 19.714 4.565 743.92 13 4 122.578 24.172 18.822 2.209 20.757 2.113 17.619 6.684 749.03 13 5 122.578 24.172 17.736 2.407 20.151 2.272 15.769 8.535 752.17 13 6 122.578 24.172 15.731 2.883 18.793 2.649 14.034 10.215 769.94 13 7 122.578 24.172 16.435 2.707 18.621 2.595 12.262 11.942 757.07 13 8 122.578 24.172 15.621 2.917 17.922 2.759 10.768 13.477 760.71 14 1 125.976 22.373 38.017 15.529 38.044 15.542 38.008 15.594 945.17 14 2 125.976 22.373 20.844 1.353 20.887 1.36 20.822 1.552 703.56 14 3 125.976 22.373 18.757 1.815 19.785 1.669 18.48 3.974 702 14 4 125.976 22.373 17.31 1.987 19.202 1.885 16.444 6.003 709.67 14 5 125.976 22.373 16.026 2.296 18.593 2.107 14.51 7.963 713.25 14 6 125.976 22.373 15.845 2.383 17.793 2.254 12.585 9.792 710.57 14 7 125.976 22.373 14.031 2.865 16.189 2.706 10.904 11.514 717.8 14 8 125.976 22.373 12.758 3.331 14.945 3.156 9.314 13.143 721.81 15 1 128.505 28.379 26.871 2.094 26.881 2.094 26.861 2.085 778.11 15 2 128.505 28.379 24.678 2.287 25.49 2.294 23.996 4.825 779.49 15 3 128.505 28.379 23.117 2.511 24.791 2.472 21.655 7.141 783.51 15 4 128.505 28.379 20.793 3.001 23.727 2.862 19.333 9.575 793.53 15 5 128.505 28.379 20.011 3.093 22.519 2.991 17.187 11.684 794.75 15 6 128.505 28.379 18.493 3.503 21.543 3.316 15.076 13.752 801.12 15 7 128.505 28.379 16.833 4.022 19.937 3.817 13.239 15.389 809.49 15 8 128.505 28.379 15.918 4.344 19.09 4.103 11.454 17.095 812.39 16 1 132.385 26.122 32.96 10.251 32.984 10.266 32.942 10.509 876.09 16 2 132.385 26.122 23.72 2.387 23.817 2.336 23.62 2.485 765.07 16 3 132.385 26.122 22.036 2.426 23.631 2.376 21.125 4.946 771.65 16 4 132.385 26.122 20.73 2.635 22.877 2.508 18.621 7.4 775.89 16 5 132.385 26.122 19.467 2.841 21.511 2.745 16.367 9.708 779.67 16 6 132.385 26.122 19.024 2.93 21.244 2.833 14.405 11.859 782.4 16 7 132.385 26.122 16.447 3.679 18.993 3.502 12.72 13.44 789.24 16 8 132.385 26.122 16.377 3.635 18.814 3.467 11.012 15.325 791.78 17 1 127.328 25.388 34.664 10.93 34.692 10.945 34.665 11.012 900.82 17 2 127.328 25.388 23.667 1.981 23.721 1.967 23.377 2.033 763.85 17 3 127.328 25.388 21.174 2.39 22.229 2.421 20.732 4.748 765.74 17 4 127.328 25.388 18.778 3.247 20.066 3.239 18.203 7.337 763.88 17 5 127.328 25.388 16.708 3.942 18.531 3.918 15.872 9.626 768.33 17 6 127.328 25.388 16.287 3.874 18.536 3.776 13.92 11.603 767.02 17 7 127.328 25.388 14.953 4.24 17.829 4.008 11.758 13.682 772.56 17 8 127.328 25.388 15.433 3.999 17.794 3.867 10.089 15.402 773.16 18 1 122.725 26.371 51.006 25.435 51.086 25.485 50.974 25.353 1086.29 18 2 122.725 26.371 23.803 2.529 23.853 2.53 23.784 2.622 766.37 18 3 122.725 26.371 21.902 2.689 23.535 2.581 20.857 5.556 766.98 18 4 122.725 26.371 20.314 3.018 22.007 2.933 18.562 7.829 767.59 18 5 122.725 26.371 17.434 3.932 20.154 3.701 16.04 10.416 776.34 18 6 122.725 26.371 16.55 4.144 18.867 3.976 14.114 12.338 775.46 18 7 122.725 26.371 15.509 4.52 17.894 4.343 12.487 14.211 778.18 18 8 122.725 26.371 14.57 4.892 17.132 4.714 11.014 15.536 782.03 19 1 118.989 23.846 51.866 29.132 52.045 29.286 51.959 29.131 1096.49 19 2 118.989 23.846 22.002 1.822 22.066 1.834 21.963 1.92 728.75 19 3 118.989 23.846 20.362 1.9 21.806 1.852 19.759 4.144 737.87 19 4 118.989 23.846 18.92 2.058 20.923 1.984 17.76 6.081 745.56 19 5 118.989 23.846 17.681 2.252 19.976 2.137 15.858 7.984 750.48 19 6 118.989 23.846 16.812 2.412 19.46 2.249 14.116 9.761 754.51 19 7 118.989 23.846 17.837 2.216 19.597 2.134 12.183 11.656 748.77 19 8 118.989 23.846 13.864 3.268 16.884 2.987 10.506 13.315 772.07 20 1 131.111 26.054 43.993 18.541 44.051 18.58 43.996 18.662 1015.47 20 2 131.111 26.054 23.719 2.179 23.792 2.205 23.69 2.535 765.36 20 3 131.111 26.054 21.583 2.388 22.884 2.307 21.163 4.881 771.11 20 4 131.111 26.054 19.553 2.843 21.503 2.697 18.493 7.522 775.68 20 5 131.111 26.054 17.405 3.585 19.838 3.406 16.21 10.033 782.51 20 6 131.111 26.054 18.054 3.157 19.701 3.063 14.56 11.557 773.38 20 7 131.111 26.054 15.448 4.111 18.095 3.925 12.702 13.444 787.13 20 8 131.111 26.054 14.94 4.274 17.363 4.065 10.793 15.349 787.01 > > > >