N <- 100
X <- matrix(c(rnorm(N, 0, 1), rnorm(N, 3, 1)), ncol = 2, byrow = TRUE)
Y <- matrix(c(rnorm(N, 0, 1), rnorm(N, 3, 1)), ncol = 2, byrow = TRUE)
truth <- c(rep(1, N / 2), rep(2, N / 2))
data_modelled <- list(X, Y)
V <- length(data_modelled)
# This R is much too low for real applications
R <- 100
thin <- 5
burn <- 10
K_max <- 10
K <- rep(K_max, V)
types <- rep("G", V)
mcmc_out <- callMDI(data_modelled, R, thin, types, K = K)
calcFusionProbabiliy(mcmc_out, 1, 2)
Run the code above in your browser using DataLab