Description Usage Arguments Value Examples
Given a Dirichlet distribution whose parameter vector α sums to
n_total
, calc_var_dirichlet
calculates the sampling variance
of an element i for which α_i = prop * n_total
,
using the formula (prop * (1 - prop)) / (n_total + 1)
.
1 | calc_var_dirichlet(prop, n_total)
|
prop |
stipulated proportion |
n_total |
the “sample size” of the Dirichlet distribution, i.e., ∑ α_i. |
The sampling variance of the proportion
1 2 | ## standard error of a proportion of 0.5 given a sample size of 2,499
sqrt(calc_var_dirichlet(0.5, 2499))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.