surveyplanning (version 0.6)

dom_optimal_allocation: Optimal sample size allocation

Description

The function computes optimal sample size allocation over strata and domain for population.

Usage

dom_optimal_allocation(id, Dom, H, Y, Rh=NULL,
                                        indicator, sup_w, sup_cv,
                                        min_size=3, correction_before=FALSE,
                                        dataset=NULL)

Arguments

Value

A list with eights data objects:dataAn object as data.table, with variables: id - variable with unit ID codes, Dom - optional variables used to define population domains, H - the unit stratum variable, Y - variable of interest, �code{Rh} - the expected response rate in each stratum, indicator - variable for full surveys, sup_w - variable for weight limit in domain of stratum, sup_cv - Variable for maximum coeficient of variation, poph - population size, nh - sample size .nh_larger_then_NhAn object as data.table, with variables: H - the stratum variable, nh - sample size, poph - population size.dom_strata_sizeAn object as data.table, with variables: H - the unit stratum variable, Dom - optional variables used to define population domains, sup_w - variable for weight limit in domain of stratum, poph - population size, nh - sample size, sample100 - sample size for fully surveyed units, design_weights - design weigts.dom_sizeAn object as data.table, with variables: Dom - optional variables used to define population domains, poph - population size, nh - sample size, sample100 - sample size for fully surveyed units, design_weights - design weigts.sizeAn object as data.table, with variables: poph - population size, nh - sample size, sample100 - sample size for fully surveyed units.dom_strata_expected_precisionAn object as data.table, with variables: H - stratum, variable - the name of variable of interest, estim - total value, deffh - design effect, s2h - population variance $S^2$, nh - sample size, Rh - response rate, poph - population size, nrh - expected number of respondents, var - expected variance, se - expected standard error, cv - expected coeficient of variance.dom_expected_precisionAn object as data.table, with variables: Dom - domain, variable - the name of variable of interest, poph - the population size, nh - sample size, nrh - expected number of respondents, estim - total value, var - the expected variance, se - the expected standart error, cv - the expected coeficient of variance.total_expected_precisionAn object as data.table, with variables: variable - the name of variable of interest, poph - the population size, nh - sample size, nrh - expected number of respondents, estim - total value, var - the expected variance, se - the expected standart error, cv - the expected coeficient of variance.

See Also

expsize, optsize

Examples

Run this code
#vars <- dom_optimal_allocation(id, dom, H, Y, indicator, 
#                                         sup_w, sup_cv, min_size=3,
#                                         correction_before=FALSE,
#                                         dataset=data)
#vars

Run the code above in your browser using DataLab