# NOT RUN {
# we define the inputs
# nburn is smaller than needed. This is
#just because of CRAN policies on the examples.
Y<-cldata[,c("measure","age")]
clus<-cldata[,c("city")]
X=data.frame(rep(1,1000),cldata[,c("sex")])
colnames(X)<-c("const", "sex")
Z<-data.frame(rep(1,1000))
nburn=as.integer(200);
a=3
# Finally we run either the model with fixed or random cluster-specific cov. matrices:
imp<-jomo1ranconhr.MCMCchain(Y,X,Z,clus,nburn=nburn,meth="random")
#We can check the convergence of the first element of beta:
plot(c(1:nburn),imp$collectbeta[1,1,1:nburn],type="l")
#Or similarly we can check the convergence of any element of the level 2 cov. matrix:
plot(c(1:nburn),imp$collectcovu[1,2,1:nburn],type="l")
# }
Run the code above in your browser using DataLab