dmbc_fit {dmbc}R Documentation

Fitter function for DMBC models.

Description

dmbc_fit() is the main function that estimates a DMBC model.

Usage

dmbc_fit(D, p, G, family, control, prior, start)

Arguments

D

A list whose elements are the dissimilarity matrices corresponding to the judgments expressed by the S subjects/raters. These matrices must be defined as a dist object.

p

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

G

A length-one numeric vector indicating the number of cluster to partition the S subjects.

family

A length-one character vector representing the type of data to analyze. Currently, it accepts only the 'binomial' value, but future developments will include the possibility to analyze continuous, multinomial and count data.

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.

start

A named list of starting values for the MCMC algorithm (see dmbc_init).

Value

A dmbc_fit_list 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_data for a description of the data format.

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

Examples

## Not run: 
data(simdiss, package = "dmbc")

G <- 3
p <- 2
prm.prop <- list(z = 1.5, alpha = .75)
burnin <- 20000
nsim <- 10000
seed <- 2301

set.seed(seed)

control <- list(burnin = burnin, nsim = nsim, z.prop = prm.prop[["z"]],
  alpha.prop = prm.prop[["alpha"]], random.start = TRUE, verbose = TRUE,
  nchains = 2, thin = 10, store.burnin = TRUE, threads = 2,
  parallel = "snow")
sim.dmbc <- dmbc(simdiss, p, G, control)

summary(sim.dmbc, include.burnin = FALSE)

library(bayesplot)
library(ggplot2)
color_scheme_set("teal")
plot(sim.dmbc, what = "trace", regex_pars = "eta")

z <- dmbc_get_configuration(sim.dmbc, chain = 1, est = "mean",
  labels = 1:16)
summary(z)
color_scheme_set("mix-pink-blue")
graph <- plot(z, size = 2, size_lbl = 3)
graph + panel_bg(fill = "gray90", color = NA)

## End(Not run)

[Package dmbc version 1.0.1 Index]