dmbc_IC {dmbc}R Documentation

Model selection of DMBC models.

Description

dmbc_IC() is the main function for simultaneously selecting the optimal latent space dimension (p) and number of clusters (G) for a DMBC analysis.

Usage

dmbc_IC(
  data,
  pmax = 3,
  Gmax = 5,
  control = dmbc_control(),
  prior = NULL,
  est = "mean"
)

Arguments

data

An object of class dmbc_data containing the data to analyze.

pmax

A length-one numeric vector indicating the maximum number of dimensions of the latent space to consider.

Gmax

A length-one numeric vector indicating the maximum number of cluster to consider.

control

A list of control parameters that affect the sampling but do not affect the posterior distribution See dmbc_control() for more details.

prior

A list containing the prior hyperparameters. See dmbc_prior() for more details.

est

A length-one character vector indicating the estimate type to use. Possible values are mean, median, ml and map.

Value

A dmbc_ic object.

Author(s)

Sergio Venturini sergio.venturini@unicatt.it

References

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>.

See Also

dmbc() for fitting a DMBC model.

dmbc_ic for a description of the elements included in the returned object.

Examples

## Not run: 
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)

## End(Not run)

[Package dmbc version 1.0.1 Index]