Skip to contents

Returns \(2 + \alpha \log(1 / \varepsilon)\), the number of stick-breaking atoms to retain so that the expected discarded tail mass is of order eps. The value is not rounded.

Usage

morie_gh_eps_dp_size(eps, alpha)

Arguments

eps

residual mass tolerance in \((0, 1)\)

alpha

Dirichlet-process precision (positive)

Value

numeric scalar truncation level (not an integer)

References

Ghosal, S. and van der Vaart, A. (2017). Fundamentals of Nonparametric Bayesian Inference. Cambridge University Press.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_gh_eps_dp_size(V, V)
#> [1]   2.0000000   0.6137056  -1.2958369  -3.5451774  -6.0471896  -8.7505568
#> [7] -11.6213710 -14.6355323