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<-6 > 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="")) + } 51 1 117.375 25.659 70.697 48.429 70.861 48.537 70.589 47.976 1242.5 51 2 117.375 25.659 32.479 11.065 32.612 11.134 32.488 10.997 917.34 51 3 117.375 25.659 24.488 6.282 24.777 6.305 24.175 6.675 832.12 51 4 117.375 25.659 20.489 5.393 21.308 5.466 19.928 5.975 815.82 51 5 117.375 25.659 18.202 5.482 20.721 5.322 17.17 8.561 824.55 51 6 117.375 25.659 16.333 5.878 19.301 5.766 14.786 10.965 823.28 51 7 117.375 25.659 15.624 5.877 18.359 5.706 12.942 13.137 825.26 51 8 117.375 25.659 16.111 5.601 18.117 5.51 10.927 15.335 822.31 52 1 131.277 26.719 40.223 14.918 40.265 14.944 40.213 15.001 972.16 52 2 131.277 26.719 29.408 6.165 29.655 6.271 29.405 6.431 869.48 52 3 131.277 26.719 24.705 4.273 25.339 4.464 24.461 4.928 835.25 52 4 131.277 26.719 22.575 3.826 24.083 3.995 21.425 8.242 833.18 52 5 131.277 26.719 20.091 4.352 21.857 4.403 18.416 10.955 834.98 52 6 131.277 26.719 18.017 4.824 20.428 4.846 16.015 11.729 832.54 52 7 131.277 26.719 18.854 4.276 20.766 4.18 14.057 13.381 829.3 52 8 131.277 26.719 17.27 4.699 19.265 4.573 12.144 15.329 833.12 53 1 116.214 22.154 21.428 1.891 21.436 1.891 21.422 1.803 669.88 53 2 116.214 22.154 19.643 1.855 21.043 1.872 19.413 3.849 679.28 53 3 116.214 22.154 18.238 1.955 20.301 1.98 17.504 5.507 684.3 53 4 116.214 22.154 16.23 2.296 18.643 2.187 15.586 7.235 696.61 53 5 116.214 22.154 15.822 2.368 18.137 2.252 13.703 8.987 691.37 53 6 116.214 22.154 13.861 2.936 16.322 2.772 11.962 10.783 703.26 53 7 116.214 22.154 13.94 2.91 16.053 2.76 10.488 12.117 696.17 53 8 116.214 22.154 14.416 2.773 16.422 2.691 9.074 13.398 690.75 54 1 124.548 21.263 26.099 7.527 26.113 7.535 26.098 7.601 764.48 54 2 124.548 21.263 18.879 3.084 19.018 3.059 18.886 3.466 657.43 54 3 124.548 21.263 17.158 3.13 18.792 3.133 16.779 5.401 668.1 54 4 124.548 21.263 16.109 3.14 18.031 3.098 14.914 7.268 674.12 54 5 124.548 21.263 16.751 2.94 17.994 2.904 13.511 8.279 668.48 54 6 124.548 21.263 16.691 2.939 17.682 2.915 11.564 10.401 667.9 54 7 124.548 21.263 14.285 3.262 16.412 3.157 10.129 11.582 683.74 54 8 124.548 21.263 13.422 3.462 15.415 3.367 8.713 12.672 688.72 55 1 129.702 28.455 57.163 29.332 57.291 29.422 57.175 29.401 1141.39 55 2 129.702 28.455 42.593 19.078 43.617 19.771 42.98 20.105 1061.2 55 3 129.702 28.455 29.733 8.822 30.25 8.982 29.443 9.143 933.56 55 4 129.702 28.455 22.838 5.653 23.263 5.75 22.403 6.654 851.5 55 5 129.702 28.455 20.638 5.862 22.397 5.857 19.758 9.293 858.9 55 6 129.702 28.455 18.699 6.279 21.448 6.064 17.314 11.997 867.24 55 7 129.702 28.455 17.564 6.606 20.385 6.344 15.031 14.106 869.57 55 8 129.702 28.455 15.147 7.528 18.228 7.272 13.028 15.947 885.65 56 1 122.954 23.737 39.513 18.212 39.567 18.252 39.523 18.195 964.16 56 2 122.954 23.737 26.975 7.133 27.162 7.248 26.898 7.372 830.07 56 3 122.954 23.737 22.436 4.847 23.22 5.209 22.253 5.97 794.89 56 4 122.954 23.737 19.599 3.582 20.507 3.738 19.196 5.479 783.07 56 5 122.954 23.737 18.037 3.695 20.257 3.645 17.14 7.126 797.39 56 6 122.954 23.737 16.743 3.855 19.414 3.711 15.151 8.905 805.66 56 7 122.954 23.737 16.75 3.86 19.087 3.715 13.395 10.889 797.14 56 8 122.954 23.737 15.252 4.113 17.961 3.925 11.393 12.922 809.38 57 1 121.749 23.431 23.678 2.437 23.687 2.438 23.671 2.45 717.56 57 2 121.749 23.431 21.132 1.824 21.718 1.804 21.031 2.774 711.21 57 3 121.749 23.431 18.741 2.244 20.049 2.225 18.483 5.269 713.67 57 4 121.749 23.431 17.272 2.538 19.314 2.471 16.245 7.427 715.85 57 5 121.749 23.431 15.846 2.96 17.964 2.826 14.47 9.25 718.15 57 6 121.749 23.431 16.039 2.718 18.104 2.628 12.718 11.131 713.64 57 7 121.749 23.431 13.051 3.967 15.824 3.739 11.126 12.482 731.45 57 8 121.749 23.431 13.16 3.794 15.629 3.601 9.62 13.963 723.76 58 1 130.181 25.862 25.981 2.958 25.99 2.96 25.974 3.006 762.16 58 2 130.181 25.862 23.155 3.171 24.229 3.265 23.02 5.836 764.1 58 3 130.181 25.862 22.193 3.013 23.651 3.104 20.538 7.887 766.12 58 4 130.181 25.862 20.381 3.245 22.406 3.345 18.395 9.619 770.97 58 5 130.181 25.862 20.25 3.136 22.234 3.174 16.253 10.493 770.26 58 6 130.181 25.862 18.313 3.53 21.007 3.477 14.279 12.317 776.2 58 7 130.181 25.862 16.145 4.171 18.931 4.024 12.534 13.968 784.8 58 8 130.181 25.862 15.347 4.333 18.013 4.196 10.558 15.578 786.42 59 1 126.539 24.208 38.868 16.842 38.917 16.876 38.871 17.04 955.79 59 2 126.539 24.208 23.964 3.193 24.125 3.13 23.855 3.291 768.13 59 3 126.539 24.208 21.07 2.883 22.223 2.883 20.839 4.443 770.69 59 4 126.539 24.208 19.125 3.111 21.103 3.026 18.379 6.974 771.52 59 5 126.539 24.208 17.784 3.291 19.613 3.205 16.249 8.236 774.49 59 6 126.539 24.208 15.935 3.748 18.772 3.632 14.487 10.219 785.44 59 7 126.539 24.208 15.385 3.809 17.733 3.628 12.477 12.127 783.02 59 8 126.539 24.208 16.239 3.548 18.224 3.421 11.02 13.78 771.6 60 1 119.885 24.188 51.187 32.795 51.268 32.859 51.173 32.988 1087.52 60 2 119.885 24.188 34.993 16.564 35.361 16.847 34.999 16.519 955.39 60 3 119.885 24.188 25.376 8.733 25.829 9.026 24.998 8.288 853.78 60 4 119.885 24.188 19.949 4.795 20.366 4.849 19.555 5.285 784.74 60 5 119.885 24.188 18.435 4.89 20.026 4.785 16.986 7.879 793.14 60 6 119.885 24.188 17.507 4.949 19.514 4.904 14.831 9.697 798.21 60 7 119.885 24.188 15.072 5.498 17.749 5.393 12.698 11.831 807.29 60 8 119.885 24.188 14.899 5.423 17.315 5.263 10.832 13.808 807.86 > > > >