
Stick-breaking weights from a vector of beta sticks
Source:R/bnp_ghosal.R
morie_gh_stick_breaking.RdConverts stick fractions V into the weights
\(w_j = V_j \prod_{l < j} (1 - V_l)\). Only the first
length(V) weights are returned; the residual mass
\(\prod_j (1 - V_j)\) is not appended, so the result sums to one
only in the limit.
References
Ghosal, S. and van der Vaart, A. (2017). Fundamentals of Nonparametric Bayesian Inference. Cambridge University Press.
Examples
V <- c(1/2, 1/3, 1/4, 1/5)
morie_gh_stick_breaking(V)
#> [1] 0.50000000 0.16666667 0.08333333 0.05000000