dmbc_prior {dmbc} R Documentation

## Auxiliary Function for Setting DMBC Model Priors

### Description

dmbc_prior() is an auxiliary function as user interface for dmbc() fitting. Typically only used when calling the dmbc() function. It is used to set prior hyperparameters.

prior_dmbc() is an alias for dmbc_prior().

check_prior() is an auxiliary function that verifies the correctness of the prior hyperparameters provided before a DMBC is fitted with dmbc().

update_prior() is an auxiliary function to modify a set of prior choices using a new value of p and G. It is intended for internal use mainly in the dmbc_ic() function.

### Usage

dmbc_prior(
eta = list(a = rep(1.5, .dmbcEnv$current_G), b = rep(0.5, .dmbcEnv$current_G)),
sigma2 = list(a = 0.1, b = 0.1),
lambda = rep(1, .dmbcEnv$current_G) ) prior_dmbc( eta = list(a = rep(1.5, .dmbcEnv$current_G), b = rep(0.5, .dmbcEnv$current_G)), sigma2 = list(a = 0.1, b = 0.1), lambda = rep(1, .dmbcEnv$current_G)
)

check_prior(prior)

update_prior(prior, p, G)


### Arguments

 eta A named list containing the hyperparameters for the prior distribution of the \eta_1,\ldots,\eta_G parameters. It should contain two numeric vectors, namely a and b. sigma2 A named list containing the hyperparameters for the prior distributions of the \sigma^2_1,\ldots,\sigma^2_G parameters. It should contain two numeric scalars, namely a and b. lambda A list containing the hyperparameters for the prior distribution of the \lambda_1,\ldots,\lambda_G parameters. It should contain a single numeric vector. prior A named list of prior hyperparameters. 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.

### Value

A list with the prior hyperparameters as components.

### Author(s)

Sergio Venturini sergio.venturini@unicatt.it

dmbc()

### Examples

## Not run:
data(simdiss, package = "dmbc")
# Shorter run than default.
sim.fit <- dmbc(simdiss,
control = dmbc_control(burnin = 1000, nsim = 2000, thin = 1, verbose = TRUE),
prior = dmbc_prior(sigma2 = list(a = 1, b = 4)))

## End(Not run)



[Package dmbc version 1.0.1 Index]