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<-6 > KS<-1 > 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="")) + } 1 1 120.452 25.893 41.111 20.8 41.158 20.834 41.115 20.789 983.1 1 2 120.452 25.893 30.223 10.948 30.561 11.122 30.081 11.745 886.87 1 3 120.452 25.893 24.655 6.33 25.424 6.614 24.239 6.949 841.76 1 4 120.452 25.893 21.382 5.163 22.746 5.085 21.01 7.033 834.98 1 5 120.452 25.893 18.906 5.266 21.384 5.296 18.034 9.773 834.71 1 6 120.452 25.893 17.857 5.353 20.448 5.212 15.238 12.346 824.54 1 7 120.452 25.893 15.269 6.194 17.689 6.113 13.11 14.004 826.87 1 8 120.452 25.893 14.167 6.533 16.526 6.368 11.32 15.642 822.93 2 1 122.529 24.952 28.396 4.237 28.414 4.241 28.396 4.242 804.85 2 2 122.529 24.952 24.943 3.428 25.959 3.753 24.89 4.931 795.63 2 3 122.529 24.952 22.027 3.098 23.081 3.167 21.441 5.113 778.25 2 4 122.529 24.952 20.188 3.232 22.041 3.192 18.789 7.414 779.04 2 5 122.529 24.952 16.905 4.192 19.158 4.143 16.065 10.15 787.29 2 6 122.529 24.952 15.674 4.439 18.36 4.462 13.956 12.322 784.98 2 7 122.529 24.952 17.859 3.479 19.578 3.453 11.91 14.324 773.96 2 8 122.529 24.952 15.315 4.247 17.505 4.232 10.151 15.616 777.52 3 1 117.709 25.712 47.693 27.361 47.785 27.431 47.7 27.448 1053.68 3 2 117.709 25.712 27.056 7.681 27.178 7.723 27.049 7.635 830.21 3 3 117.709 25.712 22.814 5.68 23.702 5.857 22.935 6.284 814.38 3 4 117.709 25.712 20.089 6.101 21.535 6.035 19.728 9.238 794.65 3 5 117.709 25.712 18.504 5.909 20.465 5.944 17.534 11.211 804.03 3 6 117.709 25.712 17.276 6.057 19.593 6.093 15.38 12.244 803.93 3 7 117.709 25.712 16.146 6.174 18.78 6.163 13.23 13.735 807.67 3 8 117.709 25.712 14.328 6.604 17.427 6.512 11.394 15.662 819 4 1 120.655 24.083 41.986 20.396 42.049 20.446 41.992 20.352 992.88 4 2 120.655 24.083 24.226 3.286 24.423 3.374 24.286 3.458 779.56 4 3 120.655 24.083 22.03 2.905 22.865 3.013 21.341 4.873 775.24 4 4 120.655 24.083 20.279 2.997 21.942 3.072 19.225 6.842 781.81 4 5 120.655 24.083 18.527 3.206 21.096 3.259 16.881 8.989 791.45 4 6 120.655 24.083 17.497 3.334 20.059 3.191 14.739 10.534 793.44 4 7 120.655 24.083 15.534 3.797 18.659 3.705 12.865 12.337 808.13 4 8 120.655 24.083 17.104 3.287 19.132 3.261 11.142 14.079 790.92 5 1 116.696 28.437 37.123 13.778 37.165 13.804 37.119 13.635 933.51 5 2 116.696 28.437 26.785 4.794 27.067 4.815 26.483 5.432 812.75 5 3 116.696 28.437 24.101 4.498 25.993 4.434 23.501 8.672 823.44 5 4 116.696 28.437 22.31 4.546 24.501 4.493 20.736 11.199 821.25 5 5 116.696 28.437 21.971 4.508 23.855 4.511 18.132 13.183 816.25 5 6 116.696 28.437 19.712 4.957 22.284 5.016 15.502 14.1 820.3 5 7 116.696 28.437 14.903 6.83 18.356 6.616 13.108 16.03 833.11 5 8 116.696 28.437 14.55 6.754 17.8 6.602 11.108 18 825.87 6 1 127.921 24.647 66.672 39.776 66.998 40.062 66.861 39.906 1217.44 6 2 127.921 24.647 38.296 13.313 38.743 13.589 38.007 13.578 1000.62 6 3 127.921 24.647 26.042 5.325 26.282 5.309 25.594 5.919 854.69 6 4 127.921 24.647 22.282 3.695 23.253 3.737 21.465 6.371 830.27 6 5 127.921 24.647 21.039 3.322 22.764 3.292 17.961 9.308 829.17 6 6 127.921 24.647 16.427 5.093 18.289 5.118 15.635 10.312 819.78 6 7 127.921 24.647 15.254 5.158 17.458 5.079 13.766 12.149 820.59 6 8 127.921 24.647 14.453 5.154 17.015 5.058 11.758 13.646 824.26 7 1 124.529 23.169 36.092 15.402 36.126 15.427 36.096 15.479 920.32 7 2 124.529 23.169 28.181 8.985 28.41 9.15 28.117 9.2 849.16 7 3 124.529 23.169 24.191 6.562 25.901 7.439 23.845 5.736 842.75 7 4 124.529 23.169 21.378 5.458 22.735 5.781 20.555 7.646 826.65 7 5 124.529 23.169 19.727 5.172 21.812 5.426 17.965 7.6 829.48 7 6 124.529 23.169 18.222 5.012 20.556 5.15 15.955 8.823 833.88 7 7 124.529 23.169 16.572 5.116 19.718 5.248 13.771 11.366 841.42 7 8 124.529 23.169 18.142 4.868 20.268 4.875 11.836 12.947 833.35 8 1 118.7 25.337 60.404 40.329 60.6 40.496 60.388 40.362 1167.74 8 2 118.7 25.337 30.508 12.497 30.642 12.577 30.353 12.513 886.58 8 3 118.7 25.337 25.505 9.203 25.929 9.412 25.185 10.13 846.09 8 4 118.7 25.337 22.203 7.958 23.865 8.314 21.85 9.142 855.21 8 5 118.7 25.337 21.545 7.527 23.453 7.826 19.344 10.852 850.21 8 6 118.7 25.337 18.738 7.466 21.813 7.556 17.096 13.172 862.11 8 7 118.7 25.337 19.849 7.205 21.874 7.397 14.654 14.169 850.49 8 8 118.7 25.337 19.243 7.132 21.227 7.356 12.575 15.731 853.27 9 1 123.409 28.378 65.784 41.321 66.041 41.525 65.819 41.269 1208.97 9 2 123.409 28.378 47.642 27.343 48.322 27.803 47.622 28.266 1105.57 9 3 123.409 28.378 38.256 18.844 39.874 20.044 37.856 20.371 1045.93 9 4 123.409 28.378 29.997 12.395 31.93 13.132 28.857 12.665 980.17 9 5 123.409 28.378 25.627 10.795 28.156 11.755 24.252 8.337 969.83 9 6 123.409 28.378 24.521 9.957 27.321 10.929 20.373 8.86 956.76 9 7 123.409 28.378 20.701 8.837 23.607 8.834 17.801 11.195 956 9 8 123.409 28.378 18.892 8.75 21.891 8.519 15.114 14.595 959.13 10 1 135.264 26.501 47.669 20.583 47.758 20.646 47.696 20.782 1054.59 10 2 135.264 26.501 26.546 4.19 26.946 4.186 26.607 4.648 821.33 10 3 135.264 26.501 23.586 3.456 25.376 3.453 23.554 7.355 826.61 10 4 135.264 26.501 21.901 3.272 24.33 3.272 20.664 8.097 823.58 10 5 135.264 26.501 19.993 3.494 22.591 3.478 18.238 9.991 825.22 10 6 135.264 26.501 18.034 3.888 20.817 3.824 15.958 11.628 830.94 10 7 135.264 26.501 16.238 4.501 19.093 4.39 13.875 13.714 834.64 10 8 135.264 26.501 14.628 5.068 17.802 4.858 11.786 15.349 842.08 > > > >