Last chance! 50% off unlimited learning
Sale ends in
dmbc_IC()
is the main function for simultaneously selecting the
optimal latent space dimension (p) and number of clusters
(G) for a DMBC analysis.
dmbc_IC(
data,
pmax = 3,
Gmax = 5,
control = dmbc_control(),
prior = NULL,
est = "mean"
)
A dmbc_ic
object.
An object of class dmbc_data
containing the data
to analyze.
A length-one numeric vector indicating the maximum number of dimensions of the latent space to consider.
A length-one numeric vector indicating the maximum number of cluster to consider.
A list of control parameters that affect the sampling
but do not affect the posterior distribution See
dmbc_control()
for more details.
A list containing the prior hyperparameters. See
dmbc_prior()
for more details.
A length-one character vector indicating the estimate type to
use. Possible values are mean
, median
, ml
and
map
.
Sergio Venturini sergio.venturini@unicatt.it
Venturini, S., Piccarreta, R. (2021), "A Bayesian Approach for Model-Based
Clustering of Several Binary Dissimilarity Matrices: the dmbc
Package in R
", Journal of Statistical Software, 100, 16, 1--35, <10.18637/jss.v100.i16>.
dmbc()
for fitting a DMBC model.
dmbc_ic
for a description of the elements included
in the returned object.
if (FALSE) {
data(simdiss, package = "dmbc")
pmax <- 2
Gmax <- 2
prm.prop <- list(z = 1.5, alpha = .75)
burnin <- 2000
nsim <- 1000
seed <- 1809
set.seed(seed)
control <- list(burnin = burnin, nsim = nsim, z.prop = prm.prop[["z"]],
alpha.prop = prm.prop[["alpha"]], random.start = TRUE, verbose = TRUE,
thin = 10, store.burnin = TRUE)
sim.ic <- dmbc_IC(data = simdiss, pmax = pmax, Gmax = Gmax, control = control,
est = "mean")
pmax <- pmax + 1
Gmax <- Gmax + 2
new.ic <- update(sim.ic, pmax = pmax, Gmax = Gmax)
new.ic
# plot the results
library(bayesplot)
library(ggplot2)
color_scheme_set("mix-yellow-blue")
p <- plot(new.ic, size = c(4, 1.5))
p + panel_bg(fill = "gray90", color = NA)
}
Run the code above in your browser using DataLab