require(ltable)
data(tdata, package="ltable")
## For better illustration You should increase draw and burnin pars
res1<-MCLogLin(Counts~smoker +contraceptive +tromb +
contraceptive*tromb, data=tdata, draw=1500, burnin=500)
data(iris)
iriscut<-with(iris, data.frame(PL=cut(Petal.Length,3),
PW=cut(Petal.Width,3)))
irist<-table_f(iriscut,"PL,PW")
irisd<-tableToData(irist, ordered="PL,PW")
res2<-ltable::MCLogLin(Counts~PW+PL+PW*PL, DIC=TRUE, data=irisd,
draw=1500, burnin=500)
Run the code above in your browser using DataLab