Generate sizes of groups in population

gen_group_sizes(N, prev_K, rho_K, .ord = NULL)

Arguments

N

sample size

prev_K

numeric vector of prevalence for each group with last group being hidden population

rho_K

numeric vector that gives lower and upper triangles of correlation matrix between group memberships. If single number all group membership correlations are assumed to be equal

.ord

character vector of ordered names of all possible combinations of group memberships. Default is NULL to generate the order automatically

Value

Vector of group sizes

Examples

if (FALSE) {
gen_group_sizes(N = 1000,
                prev_K = c(known = .3, hidden = .1),
                rho_K = .05)
}