get_allocation | R Documentation |
Allocate predetermined allocations to smaller levels using proportional allocation method
get_allocation(data, n_alloc, group, pop_var = "jml", secondary = 0)
data |
population tabulation dataframe |
n_alloc |
total allocation dataframe |
group |
group of allocation level to be obtained |
pop_var |
population variable in data |
secondary |
how many times the secondary sample compares to primary sample |
allocation at more detailed level
library(samplingin)
library(magrittr)
contoh_alokasi = alokasi_dt %>%
dplyr::select(-n_primary) %>%
dplyr::mutate(nasional = 1)
alokasi_dt = get_allocation(
data = contoh_alokasi
, n_alloc = 100
, group = c("nasional")
, pop_var = "jml_kabkota"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.