Learn R Programming

dmbc (version 0.4.0)

dmbc_get_postmedian: Extractor function for a fitted DMBC model.

Description

dmbc_get_postmedian() is an extractor function for extracting the posterior median estimates of the parameters for a fitted DMBC model.

Usage

dmbc_get_postmedian(res, chain = 1)

Arguments

res

An object of class dmbc_fit_list.

chain

A length-one numeric vector indicating the MCMC chain number to use.

Value

A named list with the following elements:

z:

array of latent coordinates posterior median estimates

alpha:

numeric vector of alpha posterior median estimates

eta:

numeric vector of eta posterior median estimates

sigma2:

numeric vector of sigma2 posterior median estimates

lambda:

numeric vector of lambda posterior median estimates

prob:

numeric matrix of probability posterior median estimates

cluster:

numeric vector of cluster membership posterior median estimates

chain:

length-one numeric vector of the MCMC chain number used

References

Venturini, S., Piccarreta, R. (2019), "A Bayesian Approach for Model-Based Clustering of Several Binary Dissimilarity Matrices: the dmbc Package in R", Technical report.

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

Run this code
# NOT RUN {
data(simdiss, package = "dmbc")

G <- 3
p <- 2
prm.prop <- list(z = 1.5, alpha = .75)
burnin <- 2000
nsim <- 1000
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)

dmbc_get_postmedian(sim.dmbc, chain = 1)
# }

Run the code above in your browser using DataLab