Skip to contents

Formula: P(new) = (alpha + sigma K) / (n + alpha)

Usage

Dpparit(n = 100, alpha = 1, sigma = 0.5, seed = 42)

Arguments

n

Number of customers to seat.

alpha

Concentration; must exceed -sigma.

sigma

Discount in [0, 1).

seed

Seed of the deterministic stream.

Value

List with estimate (number of blocks), K, counts, p_new, n, method.

Details

An occupied table takes (n_k - sigma)/(n + alpha), so the discount sigma moves mass from large tables to new ones and the number of blocks grows like n^sigma instead of log n. Setting sigma = 0 recovers the Dirichlet process exactly.

References

Pitman & Yor (1997), Ann. Probab. 25(2):855-900.

Examples

Dpparit()
#> $estimate
#> [1] 10
#> 
#> $K
#> [1] 10
#> 
#> $counts
#>  [1] 58 26  1  7  2  1  1  2  1  1
#> 
#> $p_new
#> [1] 0.05940594
#> 
#> $n
#> [1] 100
#> 
#> $method
#> [1] "Pitman-Yor two-parameter seating process"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"