rCRT: Title

View source: R/abms.R

rCRTR Documentation

Title

Description

Sampling from the Chines Restaurant distribution.

Usage

rCRT(n, b, c)

Arguments

n

Number of observations. It must be a positive integer.

b

Parameter distribution, a non-negative integer. The number of Bernoulli independent variables that are added. It can be a vector

c

Parameter distribution, a positive real number. Used calculate the success probability the j-th Bernoulli independent variable, that is, c/(c +j -1). It can be a vector

Value

This function generates n random variables from the CRT(b,c) distribution

References

Pitman, Jim (1995). "Exchangeable and Partially Exchangeable Random Partitions". Probability Theory and Related Fields. 102 (2): 145:158

Examples

#Generating 4 random variables with parameters b=2 and c=1
rCRT(4,2,1)

abms documentation built on April 12, 2025, 1:31 a.m.

Related to rCRT in abms...