get_allocation {samplingin}R Documentation

Allocate Predetermined Allocations to Smaller Levels

Description

Allocate predetermined allocations to smaller levels using proportional allocation method

Usage

get_allocation(data, n_alloc, group, pop_var = "jml", secondary = 0)

Arguments

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

Value

allocation at more detailed level

Examples


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


[Package samplingin version 1.1.0 Index]