Learn R Programming

SBMSplitMerge (version 1.1.1)

crp: Chinese Restaurant Process

Description

A blockmod for the Chinese restaurant process (CRP)

Usage

crp(gamma)

Arguments

gamma

concentration parameter

Value

a block model representing a CRP(gamma) distribution

Details

The CRP posits that each node arrives in turn. The first node joins the first block. Each subsequent node starts a new block with probability `gamma` or joins an existing block proportional to the block size.

Examples

Run this code
# NOT RUN {
## simulate from a CRP(5) prior
m <- crp(5)
print(m)
m$r(10)
# }

Run the code above in your browser using DataLab