sigma = 0 recovers DP(M, G); sigma > 0 makes the weights decay polynomially. The weights returned are EXPECTED weights, not a draw, so the result is deterministic in both language arms.
Details
Formula: V_j ~ Beta(1 - sigma, M + j sigma); W_j = V_j prod_{l<j}(1 - V_l); E[V_j] = (1 - sigma)/(M + 1 + (j - 1) sigma); V_{n,k} = prod_{i=1}^{k-1}(M + i sigma) / (M + 1)^{[n-1]}
References
Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, Section 14.4, Definition 14.31, equation (14.20). Read from the copy of the book held in the corpus. Only the sigma in [0, 1) branch is implemented; the negative-sigma branch is a finite-support family and is refused.
Examples
Poisdir(sigma = 0.5, M = 5L, k = 5L)
#> $weights
#> [1] 0.08333333 0.07051282 0.06043956 0.05238095 0.04583333
#>
#> $expected_stick
#> [1] 0.08333333 0.07692308 0.07142857 0.06666667 0.06250000
#>
#> $remaining
#> [1] 0.6875
#>
#> $log_Vnk
#> [1] NaN
#>
#> $Vnk
#> [1] NaN
#>
#> $sigma
#> [1] 0.5
#>
#> $M
#> [1] 5
#>
#> $k
#> [1] 5
#>
#> $method
#> [1] "Pitman-Yor weights and V_{n,k}, Ghosal Definition 14.31"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
