dom_optimal_allocation(id, Dom, H, Y, Rh=NULL, deffh=NULL, indicator, sup_w, sup_cv, min_size=3, correction_before=FALSE, dataset=NULL)
data.table
or variable name as character, column number.data.table
or variable names as character vector, column numbers.data.table
or variable name as character, column number.data.table
or variable names as character, column numbers.data.table
, variable name as character, or column number.Yh
. Object convertible to data.table
, variable name as character vector, or column numbers.data.table
or variable names as character, column numbers.data.table
or variable names as character, column numbers.data.table
or variable names as character, column numbers.data.table
with one row for each stratum.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,
Rh
- the expected response rate in each stratum,
deffh
- the expected design effect,
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 .data.table
, with variables:
H
- the stratum variable,
nh
- sample size,
poph
- population size.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. 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. data.table
, with variables:
poph
- population size,
nh
- sample size,
sample100
- sample size for fully surveyed units. data.table
, with variables:
H
- stratum,
variable
- the name of variable of interest,
estim
- total value,
deffh
- the expected design effect,
s2h
- population variance $S^2$,
nh
- sample size,
Rh
- the expected response rate,
deffh
- the expected design effect,
poph
- population size,
nrh
- expected number of respondents,
var
- expected variance,
se
- expected standard error,
cv
- expected coeficient of variance.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.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.expsize
, optsize
#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