dma: Dirichlet Multinomial Allocation

Description Usage Arguments Details Value Examples

View source: R/blockmod.R

Description

A blockmod for Dirichlet Multinomial Allocation (DMA)

Usage

1
dma(gamma, delta)

Arguments

gamma

parameter for Dirichlet component

delta

parameter for Poison component

Details

This model posits:

kappa-1 ~ Pois(delta)

omega|kappa, gamma ~ Dirichlet(gamma)

Z_i|omega ~ Multinomial(omega) for i=1 .. n

Value

a block model representing a dma(gamma, delta) distribution

Examples

1
2
3
4
5
6
## simulate from a DMA(2, 5) prior
## This models the `number of blocks-1` as Poisson(5)
## and block assignments as Dirichlet-Multinomial(2, 2, ...)
m <- dma(2, 5)
print(m)
m$r(10)

SBMSplitMerge documentation built on July 1, 2020, 5:23 p.m.