#First of all we load and attach the data:
data(mldata)
attach(mldata)
#Then we define all the inputs:
# nimp, nburn and nbetween are smaller than they should. This is
#just because of CRAN policies on the examples.
Y_cat=data.frame(social)
Y_numcat=matrix(4,1,1)
X=data.frame(rep(1,1000),sex)
Z<-data.frame(rep(1,1000))
clus<-data.frame(city)
betap<-matrix(0,2,3)
up<-matrix(0,10,3)
covp<-diag(1,3)
covu<-diag(1,3)
Sp=diag(1,3);
Sup=diag(1,3);
nburn=as.integer(100);
nbetween=as.integer(100);
nimp=as.integer(4);
#And finally we run the imputation function:
imp<-jomo1rancat(Y_cat, Y_numcat, X,Z,clus,betap,up,covp, covu,Sp,Sup,
nburn,nbetween,nimp)
Run the code above in your browser using DataLab