Description Usage Arguments Details Value Examples
rudirichlet
produces n
draws from a d
-dimensional
uniform Dirichlet distribution. Here "uniform" implies that any combination
of values on the support of the distribution is equally likely, that is, the
α parameters to the Dirichlet distribution are all set to 1.0.
1 | rudirichlet(n, d)
|
n |
the number of draws. |
d |
the dimension of the Dirichlet distribution. |
In the context of the Bayesian bootstrap rudirichlet
is used to
produces the bootstrap weights. Therefore, rudirichlet
can be used if
you directly want to generate Bayesian bootstrap weights.
An n
by d
matrix.
1 2 3 4 5 6 7 8 9 | set.seed(123)
rudirichlet(2, 3)
# Should produce the following matrix:
# [,1] [,2] [,3]
# [1,] 0.30681 0.2097 0.4834
# [2,] 0.07811 0.1390 0.7829
# The above could be seen as a sample of two Bayesian bootstrap weights for a
# dataset of size three.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.