#Then, we define all the inputs:
# nburn is smaller than needed. This is
#just because of CRAN policies on the examples.
Y.con=sldata[,c("measure","age")]
Y.cat=sldata[,c("social"), drop=FALSE]
Y.numcat=matrix(4,1,1)
X=data.frame(rep(1,300),sldata[,c("sex")])
colnames(X)<-c("const", "sex")
beta.start<-matrix(0,2,5)
l1cov.start<-diag(1,5)
l1cov.prior=diag(1,5);
nburn=as.integer(100);
#Then we run the sampler:
imp<-jomo1mix.MCMCchain(Y.con,Y.cat,Y.numcat,X,beta.start,l1cov.start,l1cov.prior,nburn=nburn)
#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 omega:
plot(c(1:nburn),imp$collectomega[1,1,1:nburn],type="l")
Run the code above in your browser using DataLab