powered by
Computes a Bayes factor against independence for a two-way contingency table assuming a "close to independence" alternative model
bfindep(y,K,m)
matrix of counts
Dirichlet precision hyperparameter
number of simulations
value of the Bayes factor against hypothesis of independence
estimate of the simulation standard error of the computed Bayes factor
# NOT RUN { y=matrix(c(10,4,6,3,6,10),c(2,3)) K=20 m=1000 bfindep(y,K,m) # }
Run the code above in your browser using DataLab