Learn R Programming

CoinMinD (version 1.2.1)

BMDE: BMDE: Multinomial–Dirichlet Equal Prior Bayesian Method

Description

Computes the Bayesian Dirichlet posterior for a multinomial vector with equal prior parameters and returns the posterior mean, 95 and the volume of those intervals.

Usage

BMDE(x, p)

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.

p

Numeric scalar or vector specifying Dirichlet prior parameters. Must be non-negative.

Examples

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

Run the code above in your browser using DataLab