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<-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.241 24.231 26.867 3.829 26.879 3.833 26.867 3.795 778.51 41 2 121.241 24.231 22.476 1.401 22.889 1.328 22.295 1.981 738.32 41 3 121.241 24.231 21.114 1.483 22.29 1.398 19.7 4.576 739.54 41 4 121.241 24.231 19.242 1.877 20.869 1.807 17.355 6.822 741.67 41 5 121.241 24.231 17.262 2.401 19.564 2.262 15.222 9.096 748.27 41 6 121.241 24.231 15.151 3.133 17.705 2.953 13.347 10.959 756.54 41 7 121.241 24.231 14.273 3.369 17.187 3.125 11.549 12.773 761.16 41 8 121.241 24.231 14.327 3.236 16.842 3.038 10.159 14.164 759.75 42 1 138.029 25.925 39.128 17.169 39.155 17.185 39.118 17.459 958.89 42 2 138.029 25.925 23.74 2.292 23.822 2.321 23.706 2.348 765.58 42 3 138.029 25.925 21.478 2.5 22.929 2.41 20.97 5.101 770.07 42 4 138.029 25.925 19.693 2.891 22.018 2.685 18.453 7.507 769.9 42 5 138.029 25.925 19.208 2.869 21.101 2.771 16.472 9.5 773.63 42 6 138.029 25.925 17.461 3.402 19.842 3.265 14.725 11.334 777.9 42 7 138.029 25.925 15.086 4.266 18.476 3.969 12.999 13.201 794.29 42 8 138.029 25.925 14.387 4.473 17.572 4.187 11.389 14.749 797.31 43 1 124.831 26.336 76.223 52.761 76.843 53.336 76.509 53.384 1283.31 43 2 124.831 26.336 24.052 2.509 24.115 2.581 24.009 2.497 771.83 43 3 124.831 26.336 21.546 2.885 23.866 2.587 21.202 5.375 775.37 43 4 124.831 26.336 19.522 3.431 21.553 3.328 18.446 8.017 774.08 43 5 124.831 26.336 19.17 3.341 21.119 3.244 15.883 10.473 773.12 43 6 124.831 26.336 18.056 3.641 20.014 3.562 14.079 12.374 775.52 43 7 124.831 26.336 16.171 4.326 18.497 4.173 12.449 14.021 779.96 43 8 124.831 26.336 14.56 5.027 17.21 4.819 10.876 15.635 784.71 44 1 121.522 24.454 27.294 2.89 27.31 2.894 27.295 2.809 786.22 44 2 121.522 24.454 21.415 2.197 21.828 2.192 21.579 2.969 727.15 44 3 121.522 24.454 19.349 2.501 20.785 2.431 19.368 5.354 735.19 44 4 121.522 24.454 18.445 2.71 20.059 2.634 17.401 7.259 729.96 44 5 121.522 24.454 17.659 2.873 19.302 2.803 15.344 9.314 729.84 44 6 121.522 24.454 16.643 3.099 18.786 2.985 13.358 11.377 734.58 44 7 121.522 24.454 16.019 3.288 18.035 3.197 11.588 13.041 735.72 44 8 121.522 24.454 15.503 3.431 17.433 3.31 9.906 14.834 737.95 45 1 123.325 23.538 28.879 6.028 28.899 6.036 28.869 5.941 812.98 45 2 123.325 23.538 21.233 2.412 21.378 2.401 21.096 2.696 715.2 45 3 123.325 23.538 18.93 2.559 20.638 2.491 18.75 5.007 725.15 45 4 123.325 23.538 18.704 2.535 20.275 2.474 16.48 7.293 720.99 45 5 123.325 23.538 15.451 3.438 17.972 3.271 14.265 9.539 732.84 45 6 123.325 23.538 13.715 4.085 16.393 3.905 12.337 11.449 737.08 45 7 123.325 23.538 12.131 4.797 15.432 4.456 10.634 13.267 743.52 45 8 123.325 23.538 13.079 4.19 15.442 4.015 9.039 14.728 729.51 46 1 123.801 22.484 40.42 21.396 40.489 21.453 40.443 21.488 975.03 46 2 123.801 22.484 20.827 1.743 20.964 1.761 20.811 1.783 702.35 46 3 123.801 22.484 19.351 1.8 20.698 1.758 18.604 4.151 709.94 46 4 123.801 22.484 17.655 1.965 19.908 1.845 16.575 6.068 719.78 46 5 123.801 22.484 16.031 2.295 18.418 2.155 14.567 8.027 726.87 46 6 123.801 22.484 16.431 2.185 18.707 2.04 12.792 9.732 722.07 46 7 123.801 22.484 14.711 2.59 17.276 2.424 11.146 11.556 731.83 46 8 123.801 22.484 14.371 2.691 16.648 2.53 9.583 12.871 731.81 47 1 125.172 25.227 46.663 27.314 46.767 27.402 46.682 27.445 1044.55 47 2 125.172 25.227 23.539 1.9 23.595 1.903 23.522 1.755 762.24 47 3 125.172 25.227 20.992 2.331 22.364 2.173 20.809 4.656 765.34 47 4 125.172 25.227 19.364 2.637 21.106 2.554 18.512 6.796 767.78 47 5 125.172 25.227 18.704 2.792 20.772 2.659 16.537 8.801 768.67 47 6 125.172 25.227 16.661 3.294 19.198 3.124 14.672 10.72 780.26 47 7 125.172 25.227 16.057 3.485 18.692 3.293 13.027 12.363 780.52 47 8 125.172 25.227 14.072 4.148 17.125 3.881 11.256 14.069 795.26 48 1 119.322 23.145 35.859 13.701 35.904 13.731 35.85 13.677 916.75 48 2 119.322 23.145 21.542 1.577 21.614 1.582 21.515 1.641 719.01 48 3 119.322 23.145 19.248 1.89 20.348 1.873 19.125 4.117 723.93 48 4 119.322 23.145 18.165 2.144 19.474 2.108 16.854 6.251 723.05 48 5 119.322 23.145 17.984 2.194 19.296 2.157 14.761 8.559 719.59 48 6 119.322 23.145 14.563 3.304 16.891 3.135 13.062 10.402 736.12 48 7 119.322 23.145 13.668 3.536 16.132 3.367 11.492 11.726 740.34 48 8 119.322 23.145 13.301 3.726 15.683 3.566 9.855 13.369 738.61 49 1 121.033 24.63 34.186 12.291 34.213 12.307 34.171 12.228 893.45 49 2 121.033 24.63 22.648 2.242 22.803 2.268 22.455 2.24 742.94 49 3 121.033 24.63 21.151 2.277 22.447 2.238 20.126 4.659 748.43 49 4 121.033 24.63 19.048 2.529 21.68 2.369 17.849 6.934 756.34 49 5 121.033 24.63 17.602 2.807 20.386 2.602 15.563 9.076 759.96 49 6 121.033 24.63 16.707 3.04 19.191 2.87 13.446 11.25 760.13 49 7 121.033 24.63 16.08 3.255 18.257 3.165 11.253 13.382 761.11 49 8 121.033 24.63 14.905 3.635 17.368 3.458 9.603 15.105 764.29 50 1 128.329 24.859 24.556 2.261 24.564 2.262 24.545 2.266 735.04 50 2 128.329 24.859 22.595 1.974 23.28 1.975 21.918 3.464 734.15 50 3 128.329 24.859 20.154 2.283 22.164 2.223 19.606 5.643 742.73 50 4 128.329 24.859 18.706 2.498 21.08 2.346 17.311 8.263 744.03 50 5 128.329 24.859 17.257 2.778 20.193 2.644 15.001 10.922 747.28 50 6 128.329 24.859 16.57 2.908 19.273 2.712 12.991 12.757 747.03 50 7 128.329 24.859 16.561 2.903 18.679 2.798 11.461 13.972 746.35 50 8 128.329 24.859 14.61 3.509 17.217 3.311 9.883 15.381 751.95 > > > >