## Independence MH sampling in the aggregated dRUM representation of a
## binomial logit model
## load caesarean birth data
data(caesarean)
yi <- as.numeric(caesarean[,1])
Ni <- as.numeric(caesarean[,2])
X <- as.matrix(caesarean[,-(1:2)])
## start independence MH sampler
mh1 <- dRUMIndMH(yi,Ni,X)
print(mh1)
summary(mh1)
plot(mh1)
## Not run:
# ## load simulated data set
# data(simul)
# yi <- as.numeric(simul[,1])
# Ni <- as.numeric(simul[,2])
# X <- as.matrix(simul[,-(1:2)])
#
# ## use a small acc>0 (e.g. acc=50), otherwise the sampler gets stuck at
# ## the starting values
# mh2 <- dRUMIndMH(yi,Ni,X,acc=50)
#
# print(mh2)
# summary(mh2)
# plot(mh2)
# ## End(Not run)
Run the code above in your browser using DataLab