calc_var_dirichlet: Calculate the sampling variance of an element of a...

Description Usage Arguments Value Examples

Description

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).

Usage

1
calc_var_dirichlet(prop, n_total)

Arguments

prop

stipulated proportion

n_total

the “sample size” of the Dirichlet distribution, i.e., ∑ α_i.

Value

The sampling variance of the proportion

Examples

1
2
## standard error of a proportion of 0.5 given a sample size of 2,499
sqrt(calc_var_dirichlet(0.5, 2499))

devincaughey/estsubpop documentation built on June 11, 2019, 1:31 p.m.