The following code generate Tables 4,5 in the manuscript. 5 indepdent simulation are performed. All simulations RData files can be accessed at this online folder http://www.tonyjhwueng.info/ououcir/simulation64V3set3.

rm(list=ls())
library(knitr)
load(url("http://www.tonyjhwueng.info/ououcir/unifsimtable.RData"))
kable(bigoutputtable)
model taxa alpha.y alpha.x theta.x sigmasq.x tau alpha.tau theta.tau sigmasq.tau b0 b1 b2
oubmbm 16 0.48 (0.05,0.96) NA NA 2.45 (0.58,4.55) 1.01 (0.11,1.91) NA NA NA 9.88 (5.52,14.49) 3.3 (-0.6,8.17) -2.51 (-7.23,1.53)
oubmbm 32 0.47 (0.04,0.95) NA NA 2.19 (0.65,4.52) 1.01 (0.11,1.89) NA NA NA 9.9 (5.44,14.54) 3.33 (-0.63,8.31) -2.65 (-7.42,1.51)
oubmbm 64 0.51 (0.06,0.95) NA NA 2.36 (0.45,4.56) 1.02 (0.1,1.9) NA NA NA 9.97 (5.42,14.46) 3.68 (-0.42,8.31) -2.81 (-7.4,1.49)
oubmbm 128 0.5 (0.04,0.94) NA NA 2.31 (0.65,4.44) 0.98 (0.1,1.91) NA NA NA 10.04 (5.44,14.48) 3.52 (-0.62,8.23) -2.55 (-7.19,1.56)
ououbm 16 0.52 (0.13,0.93) 0.66 (0.07,1.4) 0.03 (-2.68,2.69) 2.46 (0.74,4.6) 0.99 (0.09,1.88) NA NA NA 9.93 (5.57,14.49) 4.41 (-0.17,8.45) -2.94 (-7.31,1.46)
ououbm 32 0.46 (0.07,0.93) 0.82 (0.11,1.43) -0.09 (-2.68,2.69) 2.31 (0.59,4.49) 0.98 (0.1,1.9) NA NA NA 9.91 (5.55,14.46) 4.26 (-0.32,8.42) -2.24 (-7.34,1.66)
ououbm 64 0.48 (0.12,0.94) 0.6 (0.07,1.39) 0.01 (-2.72,2.69) 2.38 (0.67,4.63) 0.86 (0.08,1.86) NA NA NA 10.06 (5.55,14.52) 4.31 (-0.38,8.53) -2.58 (-7.3,1.57)
ououbm 128 0.46 (0.08,0.91) 0.74 (0.09,1.42) 0.09 (-2.65,2.7) 2.51 (0.85,4.45) 0.98 (0.09,1.89) NA NA NA 9.92 (5.56,14.49) 3.85 (-0.55,8.41) -2.78 (-7.41,1.53)
oubmcir 16 0.51 (0.05,0.95) NA NA 2.15 (0.41,4.57) NA 0.66 (0.07,1.24) 1.48 (0.14,2.85) 0.97 (0.09,1.9) 10.01 (5.48,14.46) 3.62 (-0.53,8.37) -2.71 (-7.37,1.52)
oubmcir 32 0.53 (0.06,0.95) NA NA 2.33 (0.6,4.54) NA 0.65 (0.06,1.24) 1.48 (0.14,2.85) 0.95 (0.1,1.89) 10.1 (5.5,14.5) 3.88 (-0.51,8.34) -2.94 (-7.43,1.49)
oubmcir 64 0.54 (0.07,0.96) NA NA 2.49 (0.77,4.59) NA 0.66 (0.06,1.24) 1.43 (0.14,2.84) 0.88 (0.08,1.87) 9.89 (5.47,14.51) 3.89 (-0.47,8.34) -3 (-7.36,1.51)
oubmcir 128 0.56 (0.07,0.96) NA NA 2.49 (0.82,4.52) NA 0.65 (0.06,1.24) 1.4 (0.13,2.82) 0.83 (0.08,1.85) 9.99 (5.48,14.52) 3.89 (-0.42,8.34) -3.23 (-7.41,1.49)
ououcir 16 0.55 (0.07,0.95) 0.86 (0.11,1.44) -0.04 (-2.7,2.67) 2.31 (0.51,4.52) NA 0.62 (0.07,1.23) 1.45 (0.16,2.84) 0.97 (0.11,1.88) 10.06 (5.45,14.41) 3.78 (-0.54,8.55) -3.15 (-7.49,1.52)
ououcir 32 0.57 (0.08,0.95) 0.75 (0.08,1.43) -0.07 (-2.7,2.66) 2.63 (0.74,4.59) NA 0.66 (0.05,1.25) 1.61 (0.21,2.9) 0.93 (0.1,1.89) 10.05 (5.49,14.53) 4.38 (-0.47,8.49) -2.9 (-7.53,1.42)
ououcir 64 0.58 (0.09,0.96) 0.95 (0.16,1.45) 0.18 (-2.63,2.69) 2.71 (0.95,4.58) NA 0.62 (0.06,1.23) 1.59 (0.18,2.84) 0.87 (0.09,1.86) 10.05 (5.46,14.56) 3.88 (-0.5,8.5) -3.16 (-7.51,1.51)
ououcir 128 0.47 (0.05,0.94) 0.84 (0.11,1.42) 0.04 (-2.68,2.63) 2.34 (0.74,4.44) NA 0.63 (0.07,1.23) 1.5 (0.22,2.83) 1.08 (0.25,1.91) 9.94 (5.48,14.47) 3.69 (-0.58,8.48) -2.8 (-7.37,1.52)

Raw code data

The following is raw code by loading RData across 5 sims.

### BIG TABLE FOR ALL PARAMETERS IN MODELS
rm(list=ls())
library(xtable)

simfolder<-"http://www.tonyjhwueng.info/ououcir/simulation64V3set3/"
simsets<-paste("uniformset",1:5,sep="")
foldername<-c("oubmbm","ououbm","oubmcir","ououcir")
n.array<-c(16,32,64,128)

bigoutputtable<- array(NA,c(16,13))
colnames(bigoutputtable)<-c("model","taxa","alpha.y","alpha.x","theta.x","sigmasq.x","tau","alpha.tau","theta.tau","sigmasq.tau","b0","b1","b2")
bigoutputtable[,1]<-rep(c("oubmbm","ououbm","oubmcir","ououcir") ,each=4)
bigoutputtable[,2]<-rep(c(16,32,64,128) ,times=4)
count<-0
for(folderIndex in 1: length(foldername)){
  # folderIndex<-1
  for(sizeIndex in 1:length(n.array)){
    # sizeIndex<-1
    count<-count+1
    postsample<-NULL
    for(simsetIndex in 1:length(simsets)){
      # simsetIndex<-1
      folder<-paste(simfolder,simsets[simsetIndex],"/",foldername[folderIndex],sep = "")
      # folder
      setwd(folder)
      rfile<-paste(foldername[folderIndex],"SimV2size",n.array[sizeIndex],".RData",sep="")
      try(load(rfile))
      postsample<-rbind(postsample,get(paste("post.",foldername[folderIndex],sep="")))
    }
    meanpost<-round(apply(postsample,2, median),2)
    qrpost<-round(apply(postsample,2,quantile,probs=c(0.05,0.95)),2)
    meanqrpost<-paste(meanpost," (",qrpost[1,],",",qrpost[2,],")",sep="")
    names(meanqrpost)<-names(meanpost)
    fillposition<-colnames(bigoutputtable)%in%names(meanpost)
    bigoutputtable[count,fillposition]<-meanqrpost
  }
}
print(bigoutputtable)
xtable(bigoutputtable[,1:10])
xtable(bigoutputtable[,c(1,2,11:13)])


#save(bigoutputtable,file="unifsimtable.RData")