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<-4 > 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="")) + } 31 1 133.315 25.704 41.961 15.473 42.013 15.504 41.967 15.635 993.01 31 2 133.315 25.704 30.986 8.934 31.296 9.129 31.017 9.88 897.56 31 3 133.315 25.704 24.789 6.032 25.304 6.247 24.721 7.275 841.82 31 4 133.315 25.704 20.667 4.23 21.358 4.238 20.336 6.005 806.46 31 5 133.315 25.704 18.631 4.424 20.374 4.38 17.752 8.328 812.48 31 6 133.315 25.704 17.192 4.697 19.549 4.588 15.234 10.578 816.14 31 7 133.315 25.704 16.022 4.809 18.787 4.644 13.543 12.47 821.05 31 8 133.315 25.704 15.144 5.053 18.068 4.815 11.8 14.238 823.45 32 1 117.776 24.431 63.97 42.234 64.407 42.613 64.178 42.273 1198.37 32 2 117.776 24.431 36.205 20.19 36.541 20.407 36.246 20.234 972.06 32 3 117.776 24.431 27.396 12.488 29.211 13.559 28.091 13.499 911.71 32 4 117.776 24.431 19.992 6.062 20.555 6.224 19.375 6.179 772.65 32 5 117.776 24.431 17.986 6.07 20.181 6.152 16.668 8.255 782.68 32 6 117.776 24.431 17.203 6.039 19.329 6.016 14.568 11.135 783.31 32 7 117.776 24.431 16.605 6.022 18.615 5.975 12.476 12.769 783.38 32 8 117.776 24.431 13.849 6.705 16.275 6.477 10.785 14.576 790.86 33 1 127.402 27.409 26.027 2.125 26.039 2.126 26.021 2.148 763.13 33 2 127.402 27.409 24.156 2.179 25.369 2.191 23.062 5.082 766.7 33 3 127.402 27.409 22.128 2.454 23.81 2.429 20.803 7.217 769.55 33 4 127.402 27.409 21.185 2.597 22.983 2.568 18.564 9.429 769.43 33 5 127.402 27.409 18.233 3.38 21.028 3.228 16.36 11.339 778.26 33 6 127.402 27.409 16.072 4.083 19.246 3.873 14.181 13.591 785.58 33 7 127.402 27.409 14.988 4.466 18.191 4.204 12.049 15.823 786.46 33 8 127.402 27.409 11.734 6.195 15.244 5.737 9.931 17.724 804.33 34 1 136.436 28.9 44.507 18.729 44.56 18.763 44.499 18.931 1021 34 2 136.436 28.9 31.92 8.182 32.261 8.385 31.753 8.535 912.36 34 3 136.436 28.9 25.038 4.02 25.619 4.142 24.804 4.965 848.62 34 4 136.436 28.9 22.703 4.077 24.924 3.982 21.996 7.852 857.41 34 5 136.436 28.9 21.077 4.349 24.105 4.18 19.329 10.353 860.1 34 6 136.436 28.9 19.459 4.66 22.538 4.469 17.06 12.669 864.97 34 7 136.436 28.9 17.829 5.14 20.782 4.943 14.856 13.961 871.9 34 8 136.436 28.9 16.878 5.428 19.527 5.208 13.043 16.242 872.03 35 1 130.142 26.203 25.427 3.333 25.437 3.335 25.426 3.414 752.1 35 2 130.142 26.203 22.85 2.986 23.847 2.965 22.718 4.307 756.89 35 3 130.142 26.203 21.404 3.048 22.946 3 20.367 6.66 754.97 35 4 130.142 26.203 18.873 3.536 21.907 3.423 18.06 9.103 776.36 35 5 130.142 26.203 17.269 3.918 20.326 3.919 15.919 11.524 780.32 35 6 130.142 26.203 17.335 3.715 20.258 3.534 13.871 13.249 772.99 35 7 130.142 26.203 16.546 3.896 19.372 3.695 12.171 15.208 774.04 35 8 130.142 26.203 15.087 4.381 17.784 4.173 10.391 16.537 781.29 36 1 123.231 26.844 51.462 30.353 51.58 30.45 51.473 30.284 1091.2 36 2 123.231 26.844 30.929 9.009 31.118 9.139 30.888 8.625 893.4 36 3 123.231 26.844 26.456 5.939 29.114 7.341 26.291 5.819 894.3 36 4 123.231 26.844 23.864 4.329 25.131 4.473 22.429 5.295 864.96 36 5 123.231 26.844 22.354 4.302 24.206 4.369 19.792 8.053 865 36 6 123.231 26.844 20.356 4.343 22.936 4.271 17.403 10.417 873.92 36 7 123.231 26.844 18.909 4.535 21.516 4.379 14.968 13.072 876.95 36 8 123.231 26.844 17.019 4.915 20.306 4.67 12.85 14.594 885.05 37 1 125.187 23.435 43.336 20.231 43.408 20.284 43.352 20.317 1008.6 37 2 125.187 23.435 22.548 3.827 22.619 3.862 22.487 4.167 740.94 37 3 125.187 23.435 19.164 4.11 19.989 4.198 19.379 6.529 728.92 37 4 125.187 23.435 16.713 5.034 17.524 5.12 16.349 8.529 704.66 37 5 125.187 23.435 15.803 4.845 17.4 4.914 14.29 10.439 707.44 37 6 125.187 23.435 14.712 5.079 16.718 5.015 12.363 12.069 709.82 37 7 125.187 23.435 13.133 5.611 15.178 5.501 10.757 13.459 715.32 37 8 125.187 23.435 11.989 6.028 14.124 5.832 9.212 14.593 718.2 38 1 129.562 26.237 27.135 3.585 27.147 3.588 27.128 3.724 783.04 38 2 129.562 26.237 23.564 3.401 24.737 3.73 23.512 5.719 781.86 38 3 129.562 26.237 21.014 3.389 22.466 3.264 20.462 6.644 770.86 38 4 129.562 26.237 18.962 3.743 21.317 3.675 18.202 8.75 780.47 38 5 129.562 26.237 19.91 3.178 21.739 3.114 16 10.882 769.45 38 6 129.562 26.237 17.69 3.602 20.496 3.472 13.858 13.133 779.02 38 7 129.562 26.237 16.61 3.842 19.212 3.737 12.106 14.705 783.3 38 8 129.562 26.237 14.814 4.427 17.649 4.254 10.515 15.951 791.49 39 1 130.596 25.388 42.676 17.134 42.743 17.178 42.699 17.253 1001.15 39 2 130.596 25.388 24.627 4.44 24.734 4.488 24.526 4.652 784.46 39 3 130.596 25.388 21.246 3.733 22.283 3.877 21.111 6.156 778.66 39 4 130.596 25.388 18.325 4.201 19.82 4.195 18.05 7.989 772.41 39 5 130.596 25.388 17.382 4.019 18.795 3.926 15.682 9.998 763.12 39 6 130.596 25.388 15.487 4.659 17.88 4.454 13.328 12.316 766.46 39 7 130.596 25.388 14.204 5.185 16.297 5.01 11.712 13.858 764.82 39 8 130.596 25.388 13.478 5.411 15.48 5.236 10.145 15.462 768.72 40 1 128.409 24.402 23.956 2.917 23.965 2.918 23.953 2.968 723.49 40 2 128.409 24.402 21.279 2.496 22.519 2.464 21.117 4.1 723.45 40 3 128.409 24.402 19.824 2.651 20.965 2.615 18.612 6.427 715.43 40 4 128.409 24.402 17.421 3.234 19.225 3.204 16.394 8.289 718.53 40 5 128.409 24.402 15.996 3.595 17.997 3.485 14.318 10.326 720.21 40 6 128.409 24.402 15.177 3.848 17.406 3.692 12.668 11.901 719.34 40 7 128.409 24.402 11.916 5.299 14.74 4.973 10.883 13.743 742.17 40 8 128.409 24.402 12.319 4.971 14.831 4.708 9.279 15.247 726.39 > > > >