# \donttest{
N <- 500
K <- 4
P <- 10
X <- generateSimulationDataset(K, N, P)
Y <- generateSimulationDataset(K, N, P)
Z <- generateSimulationDataset(K, N, P)
row.names(Z$data) <- row.names(Y$data) <- row.names(X$data)
data_modelled <- list(X$data, Y$data, Z$data)
n_chains <- 4
R <- 10000
thin <- 25
types <- c("G", "G", "G")
K <- c(10, 10, 10)
mcmc <- runMCMCChains(data_modelled, n_chains, R, thin, types, K = K)
burn <- 2500
mcmc <- processMCMCChains(mcmc, burn, construct_psm = TRUE)
psm_df <- comparePSMsAcrossChains(mcmc)
psm_df |>
ggplot2::ggplot(ggplot2::aes(x = x, y = y, fill = Entry)) +
ggplot2::geom_tile() +
ggplot2::facet_grid(View ~ Chain, labeller = ggplot2::label_both) +
ggplot2::scale_fill_gradient(low = "#FFFFFF", high = "#146EB4") +
ggplot2::labs(x = "Item", y = "Item", fill = "Coclustering\nproportion") +
ggplot2::theme(
axis.text = ggplot2::element_blank(),
axis.ticks = ggplot2::element_blank(),
panel.grid = ggplot2::element_blank(),
axis.title.y = ggplot2::element_text(size = 10.5),
axis.title.x = ggplot2::element_text(size = 10.5),
plot.title = ggplot2::element_text(size = 18, face = "bold"),
plot.subtitle = ggplot2::element_text(size = 14),
strip.text.x = ggplot2::element_text(size = 10.5),
legend.text = ggplot2::element_text(size = 10.5)
)
# }
Run the code above in your browser using DataLab