data(rain)
y = rain$y
X = rain$X
n = rain$n
N = length(y+1)
mu = 0.0
phi = 1.0
W = 0.1
m0 = -1.0
C0 = matrix(1.0)
out = CUBS.C(y, X, n, mu, phi, W, m0, C0, "binom")
samp = 1
beta = matrix(0, nrow=samp, ncol=N+1)
for (i in 1:samp) {
## if (i%%100==0) {cat("Iteration", i, "\n")}
out = CUBS.C(y, X, n, mu, phi, W, m0, C0, "binom")
beta[i,] = out$beta
}
qt = apply(beta, 2, function(x){quantile(x, c(0.25, 0.5, 0.75))})
## plot (qt[2,], col=1, type="l")
## lines(qt[1,], col=3)
## lines(qt[3,], col=3)
Run the code above in your browser using DataLab