Learn R Programming

CoinMinD (version 1.2.1)

BMDU: BMDU: Multinomial–Dirichlet Unequal Prior Bayesian Method

Description

Computes the Bayesian Dirichlet posterior for a multinomial vector using unequal prior parameters. The prior is constructed by dividing the categories into two groups, assigning random priors from different ranges to simulate unequal information across categories.

Usage

BMDU(x, d)

Value

Prints posterior means, lower and upper 95

and the product of the interval widths (volume).

Arguments

x

Integer vector of observed counts. Must be non-negative.

d

Integer scalar controlling how the categories are divided into two groups for constructing unequal Dirichlet priors.

Examples

Run this code
y <- c(44, 55, 43, 32, 67, 78)
z <- 2
BMDU(y, z)

Run the code above in your browser using DataLab